24.04.2011, 11:07
How can I make the server save the players skin they had before doing /duty, and give it back to them when they do /dutyoff
Код:
COMMAND:duty(playerid, params[]) { if(IsPlayerConnected(playerid)) { if(IsPlayerInRangeOfPoint(playerid, 2.0, 1555.097900, -1675.848754, 16.195312)) { SetPlayerColor(playerid, 0x0259EAAA); SetPlayerSkin(playerid,281); SendClientMessage(playerid, 0x0259EAAA, "You Are Now A Cop, Use /equip To Get Weapons."); return 1; } else return SendClientMessage(playerid, 0x0259EAAA, "You Are Not In LSPD Entrance."); } else return SendClientMessage(playerid, 0x0259EAAA, "Player Is Not Online"); } COMMAND:dutyoff(playerid, params[]) { if(GetPlayerColor(playerid) == 0x0259EAAA) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, 0xFFFFFFAA); ResetPlayerWeapons(playerid); SendClientMessage(playerid, 0x0259EAAA, "You Are Now Off Duty."); return 1; } else return SendClientMessage(playerid, 0x0259EAAA, "Player Is Not Online"); } else return SendClientMessage(playerid, 0x0259EAAA, "Only Cops Can Use This Command."); }