//===============GMX====================
CMD:gmx(playerid,params[])
{
if(Logged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You are not logged in.");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_GREY,"You are not allowed to use this command");
SendRconCommand("gmx");
return 1;
}
function SaveAccountStats(playerid)
{
if(Logged[playerid] == 1)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
//---------------------------------------------------//
PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
PlayerInfo[playerid][pCash] = GetPlayerCash(playerid);
PlayerInfo[playerid][pLevel] = GetPlayerScore(playerid);
//---------------------------------------------------//
INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
INI_WriteInt(File,"Radio",PlayerInfo[playerid][pRadio]);
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Sex",PlayerInfo[playerid][pSex]);
INI_WriteInt(File,"Level",PlayerInfo[playerid][pLevel]);
INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
INI_WriteInt(File,"banned",PlayerInfo[playerid][pBanned]);
INI_WriteInt(File,"Taxi",PlayerInfo[playerid][pTaxi]);
INI_WriteInt(File,"Skin",PlayerInfo[playerid][pSkin]);
INI_WriteInt(File,"Team",PlayerInfo[playerid][pTeam]);
INI_WriteInt(File,"Accent",PlayerInfo[playerid][pAccent]);
INI_Close(File);
}
return 1;
}
|
He doesn`t save it,you need to save data on this command and then to make a timer to restart the server.
|
CMD:gmx(playerid,params[])
{
if(Logged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You are not logged in.");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_GREY,"You are not allowed to use this command");
SaveAccountStats(playerid);
SendRconCommand("gmx");
return 1;
}
|
Код:
CMD:gmx(playerid,params[])
{
if(Logged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You are not logged in.");
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_GREY,"You are not allowed to use this command");
SaveAccountStats(playerid);
SendRconCommand("gmx");
return 1;
}
|