14.10.2012, 01:26
I believe the streamer version is the latest one. If you would like the server.log of when I start the server just ask in a reply. And here is my /gmx command.
And Just incase i listed the GameModeInitExitFunc
Код:
if(strcmp(cmd, "/gmx", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
GameModeInitExitFunc();
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !");
}
}
return 1;
Код:
public GameModeInitExitFunc()
{
gmx = 1;
new string[128];
format(string, sizeof(string), "Restarting! Please Wait");
//foreach(Player, i)
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
OnPlayerSave(i);
DisablePlayerCheckpoint(i);
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);
gPlayerLogged[i] = 0;
}
}
SaveFamilies();
SaveCar();
SaveHouse();
SaveBiz();
//Speedo
for(new i=0; i<PLAYERS; i++)
{
TextDrawHideForPlayer(i, LBox[i]);
TextDrawHideForPlayer(i, LLine1[i]);
TextDrawHideForPlayer(i, LLine2[i]);
TextDrawHideForPlayer(i, LLine3[i]);
TextDrawHideForPlayer(i, LLine4[i]);
TextDrawHideForPlayer(i, LCredits[i]);
TextDrawHideForPlayer(i, Lmph[i]);
TextDrawHideForPlayer(i, LFunc[i]);
}
for(new n = 0; n < MAX_VEHICLES; n++)
{
if(CarInfo[n][Neon] == 1)
{
DestroyObject(ObjectSelect[n][0]);
DestroyObject(ObjectSelect[n][1]);
}
}
//
SetTimer("GameModeExitFunc", 4000, 0);
return 1;
}
