Witam
Posiadam plugin, który polega na wyświetlaniu okna graczowi w momencie wejścia na serwer, lecz takowy plugin tego nie robi, całe okno które ma się wyświetlić opiera się na pluginie webshortcuts_csgo.smx
Poniżej umieszczam kod pluginu, który pełni funkcje wymuszenia komendy i wyświetlania okienka
#include <sourcemod>
#include <sdktools>
#include <cstrike>
public Plugin:myinfo =
{
name = "Reklama",
author = "Kempus",
description = "Plugin wyświetlający reklamę przy wejściu",
version = "1.0",
url = "http://google.pl/"
};
public void OnClientPutInServer(int client)
{
CreateTimer(25.0, Timer_Advertise, GetClientSerial(client), true);
}
public Action Timer_Advertise(Handle timer, any data)
{
int client = GetClientFromSerial(data);
if (!IsClientConnected(client) || CheckCommandAccess(client, "sm_reklama", ADMFLAG_RESERVATION))
return Plugin_Stop; // Our client is gone or have access to the admin command sm_reklama... ABORT!
else if (IsClientInGame(client))
{
FakeClientCommandEx(client, "say !reklama"); // say !reklama
return Plugin_Stop; // We done what we needed, end timer.
}
return Plugin_Continue; // Timer will trigger again.
}


Dodatki SourceMod













