Reconnect Players on restart
#8

i made this code now try it,i am sure that it will work:
pawn Код:
if(strcmp(cmd, "/gmx", true) == 0)
    {
        if(IsPlayerAdmin(playerid)) //place your Playerinfo..padmin thingy here
        {
            GameModeInitExit();
        }
        else
        {
            SendClientMessage(playerid, -1, "   You are not an admin !");
        }
        return 1;
    }
and :
pawn Код:
forward GameModeInitExit();
public GameModeInitExit()
{
    new string[128];
    format(string, sizeof(string), "Server Restarting...");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            OnPlayerSave(i); //to save stats and...
            GameTextForPlayer(i, string, 4000, 5);
            SetPlayerInterior(i, 0);
            SetPlayerVirtualWorld(i, 0);
            SetPlayerCameraPos(i,1460.0, -1324.0, 287.2);
            SetPlayerCameraLookAt(i,1374.5, -1291.1, 239.0);
        }
    }
    SetTimer("GameModeExitFunc", 4000, 0);
    return 1;
}
and:
pawn Код:
public GameModeExitFunc()
{
    GameModeExit(); //if you have timers running ,use Kill timer before this line to stop the timer.
}
Reply


Messages In This Thread
Reconnect Players on restart - by Yashas - 03.03.2014, 15:05
Re: Reconnect Players on restart - by Keyhead - 03.03.2014, 15:08
Re: Reconnect Players on restart - by Yashas - 03.03.2014, 15:14
Re: Reconnect Players on restart - by anou1 - 03.03.2014, 15:19
Re: Reconnect Players on restart - by Vince - 03.03.2014, 15:40
Re: Reconnect Players on restart - by Yashas - 03.03.2014, 16:08
Re: Reconnect Players on restart - by Yashas - 03.03.2014, 19:24
Re: Reconnect Players on restart - by Nurgle4 - 03.03.2014, 19:41
Re: Reconnect Players on restart - by Yashas - 04.03.2014, 03:35
Re: Reconnect Players on restart - by Nurgle4 - 04.03.2014, 04:15

Forum Jump:


Users browsing this thread: 4 Guest(s)