05.09.2017, 07:58
Hi Guyz,I have made a adminduty command in which the player goes into admin mode.The problem is that whenever i do /aduty the player changes the skin to which i have set into pwn but when the player again do /aduty to turnoff the admin duty,the player gets CJ'S Skin,I want that the player will get his old skin that he has choosen before spawning,Help me...My Command :
Код:
COMMAND:adminduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdminlevel] > 0)
{
if(AdminDuty[playerid] == 1)
{
SetPlayerToTeamColor(playerid);
SetPlayerSkin(playerid,OldSkin[playerid]);
SendClientMessage(playerid,COLOR_ADMIN,"Admin Duty Is Now OFF.");
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
AdminDuty[playerid] = 0;
OldSkin[playerid] = GetPlayerSkin(playerid);
}else{
SendClientMessage(playerid,COLOR_ADMIN,"Admin Duty Is Now ON.");
GivePlayerWeapon(playerid, 38, 9999999);
SetPlayerColor(playerid,COLOR_ADMIN);
SetPlayerSkin(playerid, 217);
AdminDuty[playerid] = 1;
}
}else{
SendClientMessage(playerid,COLOR_ERROR,""ERROR_MSG"");
}
return 1;
}


