Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdkhooks>
- #include <colors>
- #define MAX_PLAYERS 24 // maksymalna ilosc graczy na serwerze
- #define prefix "\x0C Ciekawy przedrostek \x01"
- int ReklamaInfoo[MAX_PLAYERS+1];
- public void OnClientPutInServer(int client)
- {
- ReklamaInfoo[client] = 0;
- CreateTimer(5.0, ReklamaInfo, client, TIMER_FLAG_NO_MAPCHANGE);
- }
- public Action ReklamaInfo(Handle timer, int client)
- {
- if(!IsValidClient(client)) return;
- switch(ReklamaInfoo[client])
- {
- case 0:
- {
- PrintToChat(client, "Wiadomość powitalna przy dołączeniu na serwer", prefix);
- }
- case 1: PrintToChat(client, "[%s] Właścicielem serwera jest: \x04xxxxxxxxxxxxxx", prefix);
- case 2: PrintToChat(client, "[%s] Dodaj nasz serwer do ulubionych IP: \x04xxxxxxxxx", prefix);
- case 3: PrintToChat(client, "[%s] Po grze zapraszamy na forum xxxxxxx", prefix);
- }
- ReklamaInfoo[client]++;
- if(ReklamaInfoo[client] > 3) ReklamaInfoo[client] = 1; //JEŻELI ZMIENIASZ ILOŚĆ REKLAM MUSISZ PODMIEC "3" NA ILOŚĆ REKLAM
- CreateTimer(16.0, ReklamaInfo, client, TIMER_FLAG_NO_MAPCHANGE);
- }
- public bool IsValidClient(int client)
- {
- if(client >= 1 && client <= MaxClients && IsClientInGame(client))
- return true;
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement