27.07.2014, 11:35
Hello everyone,
I'm trying to solve the GMX issue but I just cant. I need your help.
There is no Errors or something. Only issue I'll show you the code and bring you some small desc.
The Public:
The Command:
When I'm typing this command the server is being restarted and my account stay like I logged in before and not like I left him after the reset. I just dont know what is the issue here in the script I just Its aint working.
Thanks for everyones support.
I'm trying to solve the GMX issue but I just cant. I need your help.
There is no Errors or something. Only issue I'll show you the code and bring you some small desc.
The Public:
pawn Код:
public OnGameModeExit()
{
foreach (Player,i)
{
OnPlayerDataSave(i);
DeletePVar(i, "PlayerLogged");
}
SaveBizz();
SaveProperty();
SaveCars();
SaveFactions();
SaveInts();
SaveTags();
SaveNormalCars();
SaveCars2();
printf("Gamemode has been restarted successfully.");
return 1;
}
The Command:
pawn Код:
COMMAND:gmx(playerid, params[])
{
if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "SERVER: You must be logged in to use this.");
if(!AdminUser(playerid)) return SendClientMessage(playerid, COLOR_GREY, "SERVER: You need to create a admin user, /admincreate.");
if(GetPVarInt(playerid, "AdminLogged") == 0) return SendClientMessage(playerid, COLOR_GREY, "SERVER: You need to login into your admin account, /adminlogin.");
if(GetPVarInt(playerid, "Admin") >= 10)
GameModeExit();
else SendClientMessage(playerid, COLOR_LIGHTRED, "You do not have access to this command !");
return 1;
}
Thanks for everyones support.
