Game Mode Help!
#1

Hi guys

I'm running my hosted server with a script which start and end rounds. After Time is equal to 0 new gamemode started randomly(by SendRconCommand(command)) .

After every GamemodeExit A message show that - XYZ disconnected from server.
Can any tell me that how to make it like when gamemodeexit this message won't be done and when player quit as by yourself then this message would be done . Thank you.

Sorry for my bad english.

rep++.
Reply
#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
#3

It recieves tag mismatch warning under OnGameModeExit.
How to fix it.
Reply
#4

Thank You it works
rep++;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)