15.06.2014, 13:55
Here's a Logic code.
At the top of your script add.
Then.
Then, Under OnPlayerDisconnect
EDIT: Added rank and a little elaboration.
At the top of your script add.
pawn Код:
enum pInfo
{
pHelper
}
new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
CMD:makehelper(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
new id,rank;
if(sscanf(params,"ii",id,rank))
{
SendClientMessage(playerid,-1,"USAGE: /makehelper [playerid] [rank]");
return 1;
}
else
{
if(IsPlayerConnected(i))
{
PlayerInfo[id][pHelper]=rank; //Rank according to you.
}
else
{
SendClientMessage(playerid,-1,"Player is not Online");
return 1;
}
}
}
else
{
SendClientMessage(playerid,-1,"You are not an Admin");
return 1;
}
return 1;
}
pawn Код:
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pHelper]);
INI_Close(File);