04.08.2012, 09:33
Hello This is my command hos can change it that when a player go /guarduty off his skin comes to be what he had last time instead off 101
pawn Код:
YCMD:guardduty(playerid, params[]) {
if(isnull(params))
return SendClientMessage(playerid, -1, "Type /guardduty [ON|OFF]");
static
playerName[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][SFCS] == 0) return 1;
if(!strcmp(params, "ON", true)) {
GetPlayerName(playerid, playerName, sizeof playerName);
SetPVarString(playerid, "name", playerName);
SetPlayerSkin(playerid,0);
SetPlayerColor(playerid,0xFFA100FF);
new string[126];
format(string, sizeof(string), "%s changes his clothes for duty", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
if(!strcmp(params, "OFF", true)) {
SetPlayerSkin(playerid,101);
SetPlayerColor(playerid,0xFFFFFF00);
new string[126];
format(string, sizeof(string), "%s changes his clothes for going offduty", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
}
return 1;
}