Untitled
Guest 1,232 22nd Jan, 2023
#include <sourcemod>
#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), "<b><font color='#23f911' class='fontSize-xl'>BONUS</font></b> \n <font class='fontSize-l'>Chcesz co rundę otrzymywać bonusy? \n Dołącz do naszego <b><font color='#ff0000' class='fontSize-l'>Discorda</font></b> \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), "<b><font color='#23f911' class='fontSize-xl'>KONKURS</font></b> \n <font class='fontSize-l'>Każdego miesiąca <font color='#ff0000' class='fontSize-l'>TOP3</font> osoby dostają VIPA \n Nagrodę odbieramy na <b><font color='#ff0000' class='fontSize-l'>Discord</font></b> \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), "<b><font color='#23f911' class='fontSize-xxl'>֎</font></b> \n <font class='fontSize-l'>Z Vipem zawsze lepiej</font> \n <font color='#32ff00' class='fontSize-l'>TAB</font> -> <font color='#32ff00' class='fontSize-l'>Strona serwera</font> \n <font class='fontSize-l'>Lub</font> \n <font color='#32ff00' class='fontSize-l'>sklep.onefrag.pl</font> \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), "<b><font color='#23f911' class='fontSize-xxl'>SKLEPSMS</font></b> \n <font class='fontSize-l'>Z Usługę VIP, kupisz w</font> <font color='#32ff00' class='fontSize-l'>!sklepsms</font> \n <font class='fontSize-l'>Dostępne metody płatności</font> <font color='#32ff00' class='fontSize-l'>SMS, PSC, Przelew, PayPal, Skiny</font> \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), "<b><font color='#23f911' class='fontSize-xxl'>REKRUTACJA</font></b> \n <font class='fontSize-l'>Rekrutacja na Admina jest</font> <font color='#32ff00' class='fontSize-l'>x04OTWARTA!</font> \n <font class='fontSize-l'>Zachęcamy do składania podań, na </font><font color='#32ff00' class='fontSize-l'>discord</font> \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
To share this paste please copy this url and send to your friends
RAW Paste Data