Raised This Month: $ Target: $400
 0% 

Messages do not display


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
szogun
Senior Member
Join Date: Apr 2016
Old 01-23-2023 , 11:47   Messages do not display
Reply With Quote #1

hey , will you help me to make the plug-in correctly, I unfortunately no longer have the skills to make it work

PHP Code:
#include <sourcemod>

#pragma newdecls required
#pragma semicolon 1

#define MAX_PLAYERS 32
int ReklamaHint[MAX_PLAYERS+1];

g_sAdverts[][] = {
"<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",
"Reklama 2",
"Reklama 3"};

public 
void OnClientPutInServer(int client)
{
    
ReklamaHint[client] = 0;
}

public 
void OnPluginStart() {
    
HookEvent("round_freeze_end"Event_RoundStart);
}

public 
Action Event_RoundStart(Event eEvent, const char[] namebool dontBroadcast) {
    
int client GetClientOfUserId(GetEventInt(eEvent"userid"));
    
CreateTimer(10.0HintMessageclientTIMER_FLAG_NO_MAPCHANGE);
}

public 
Action HintMessage(Handle timerint client){
    if(!
IsValidClient(client)) return;
        
PrintToChat(client,"timer"); //debug

    
char sBuffer[1024];
    
Format(sBuffer,sizeof(sBuffer),"%s",g_sAdverts[ReklamaHint[client]]);
        
PrintToChat(client,"showwinpanel"); //debug
    
Event    eEvent CreateEvent("cs_win_panel_round"true);
            
eEvent.SetString("funfact_token"sBuffer);
            
eEvent.FireToClient(client);
            
eEvent.Cancel();

            
CreateTimer(10.0cswinpanelclearclientTIMER_FLAG_NO_MAPCHANGE);
}

public 
Action cswinpanelclear(Handle timerint client){
    
PrintToChat(client,"clearwinpanel"); //debug
    
Event eEvent CreateEvent("cs_win_panel_round"true);
    
eEvent.SetString("funfact_token""");
    
eEvent.FireToClient(client);
    
eEvent.Cancel();
}

public 
bool IsValidClient(int client)
{
    if(
client >= && client <= MaxClients && IsClientInGame(client) && IsClientConnected(client) && !IsFakeClient(client) && !IsClientReplay(client) && !IsClientSourceTV(client))
        return 
true;
    return 
false;

szogun is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode