Thread: Message center
View Single Post
MBf
Member
Join Date: Aug 2016
Old 06-15-2017 , 02:36   Re: Message center
Reply With Quote #6

thank you
Quote:
Originally Posted by WatchDogs View Post
Here you are.

PHP Code:
#pragma semicolon 1

#include <sourcemod>  
#include <cstrike>

#pragma newdecls required

// Count of messages
#define MessageCount    5

// Messages to show every 5 second after round start - Edit and add more if you want
char sMessages[MessageCount][256] =  

    
"Hello World!",
    
"Message 1",
    
"Message 2",
    
"Message 3",
    
"Message 4"
};

int j 0;


public 
void OnPluginStart()
{
    
HookEvent("round_start"OnRoundStart);
}

public 
Action OnRoundStart(Handle event, const char[] namebool dontBroadcast)
{
    
SetHudTextParams(-1.00.15.025525525525500.10.10.1); 
    
CreateTimer(5.0ShowHUD_TIMER_REPEAT);
    
0;
}


public 
Action ShowHUD(Handle timer)  
{
    if(
>= MessageCount
        return 
Plugin_Stop;
    
    for (
int i 1<= MaxClientsi++) 
    {
        if (
IsClientInGame(i) && !IsFakeClient(i))  
        {
            
ShowHudText(i5sMessages[j]);
        }
    }  
    
j++;
    return 
Plugin_Continue;

__________________
PLAY.ACEARENA.RO
WWW.ACEARENA.RO
MBf is offline