#include #pragma newdecls required #pragma semicolon 1 #define MAX_PLAYERS 32 int ReklamaHint[MAX_PLAYERS+1]; public void OnClientPutInServer(int client) { ReklamaHint[client] = 0; CreateTimer(5.0, HintMessage, client, TIMER_FLAG_NO_MAPCHANGE); } public void OnPluginStart() { HookEvent("round_start", Event_RoundStart); } public Action Event_RoundStart(Event eEvent, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(GetEventInt(event, "userid")); CreateTimer(5.0, HintMessage, client, TIMER_FLAG_NO_MAPCHANGE); } public Action HintMessage(Handle timer, int client){ if(!IsValidClient(client)) return; PrintToChat(client,"timer"); switch(ReklamaHint[client]) { case 0:{ PrintToChat(client,"case 0"); char sBuffer[1024]; Format(sBuffer, sizeof(sBuffer), "BONUS \n Chcesz co rundę otrzymywać bonusy? \n Dołącz do naszego Discorda \n"); Event eEvent = CreateEvent("cs_win_panel_round", true); eEvent.SetString("funfact_token", sBuffer); eEvent.FireToClient(client); eEvent.Cancel(); CreateTimer(10.0, cswinpanelclear, client, TIMER_FLAG_NO_MAPCHANGE); } case 1:{ char sBuffer[1024]; Format(sBuffer, sizeof(sBuffer), "KONKURS \n Każdego miesiąca TOP3 osoby dostają VIPA \n Nagrodę odbieramy na Discord \n"); Event eEvent = CreateEvent("cs_win_panel_round", true); eEvent.SetString("funfact_token", sBuffer); eEvent.FireToClient(client); eEvent.Cancel(); CreateTimer(10.0, cswinpanelclear, client, TIMER_FLAG_NO_MAPCHANGE); } case 2:{ char sBuffer[1024]; Format(sBuffer, sizeof(sBuffer), "֎ \n Z Vipem zawsze lepiej \n TAB -> Strona serwera \n Lub \n sklep.onefrag.pl \n"); Event eEvent = CreateEvent("cs_win_panel_round", true); eEvent.SetString("funfact_token", sBuffer); eEvent.FireToClient(client); eEvent.Cancel(); CreateTimer(10.0, cswinpanelclear, client, TIMER_FLAG_NO_MAPCHANGE); } case 3:{ char sBuffer[1024]; Format(sBuffer, sizeof(sBuffer), "SKLEPSMS \n Z Usługę VIP, kupisz w !sklepsms \n Dostępne metody płatności SMS, PSC, Przelew, PayPal, Skiny \n"); Event eEvent = CreateEvent("cs_win_panel_round", true); eEvent.SetString("funfact_token", sBuffer); eEvent.FireToClient(client); eEvent.Cancel(); CreateTimer(10.0, cswinpanelclear, client, TIMER_FLAG_NO_MAPCHANGE); } case 4:{ char sBuffer[1024]; Format(sBuffer, sizeof(sBuffer), "REKRUTACJA \n Rekrutacja na Admina jest x04OTWARTA! \n Zachęcamy do składania podań, na discord \n"); Event eEvent = CreateEvent("cs_win_panel_round", true); eEvent.SetString("funfact_token", sBuffer); eEvent.FireToClient(client); eEvent.Cancel(); CreateTimer(10.0, cswinpanelclear, client, TIMER_FLAG_NO_MAPCHANGE); } } ReklamaHint[client]++; if(ReklamaHint[client] > 4) ReklamaHint[client] = 1; } public Action cswinpanelclear(Handle timer, int client){ Event eEvent = CreateEvent("cs_win_panel_round", true); eEvent.SetString("funfact_token", ""); eEvent.FireToClient(client); eEvent.Cancel(); } public bool IsValidClient(int client){ if(client >= 1 && client <= MaxClients && IsClientInGame(client)) return true; return false; } //font size //fontSize-xs - 8px //fontSize-s - 12px //fontSize-sm - 16px //fontSize-m - 18px //fontSize-l - 24px //fontSize-xl - 32px //fontSize-xxl - 40px