Game Mode Help!
#2

I would do that in the following way;

PHP код:
new bool:IsRestarting// Create a new variable
// Under your command
IsRestarting true;
// OnPlayerDisconnect
if(!IsRestarting// We tell the script to only do the following if the server is not restarting
{
    new 
string[128];
    switch(
reason)
    {
         case 
0:format(stringsizeof(string), "%s timed out."GetName(playerid));
        case 
1:format(stringsizeof(string), "%s left."GetName(playerid));
        case 
2:format(stringsizeof(string), "%s kicked."GetName(playerid));
    }
    
SendClientMessageToAll(-1string);
}
// OnGameModeExit
IsRestarting false;
// function used:
stock GetName(playerid)
{
    new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    return 
name;

Reply


Messages In This Thread
Game Mode Help! - by TadePoleMG - 04.05.2018, 14:54
Re: Game Mode Help! - by kovac - 04.05.2018, 15:07
Re: Game Mode Help! - by TadePoleMG - 04.05.2018, 15:20
Re: Game Mode Help! - by TadePoleMG - 04.05.2018, 15:32

Forum Jump:


Users browsing this thread: 2 Guest(s)