03.03.2014, 19:41
i made this code now try it,i am sure that it will work:
and :
and:
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;
}
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;
}
pawn Код:
public GameModeExitFunc()
{
GameModeExit(); //if you have timers running ,use Kill timer before this line to stop the timer.
}