20.01.2015, 12:20
This command works only on id 0, the problem is with "playerb"
Can anyone fix it?
Can anyone fix it?
pawn Код:
CMD:stealclothes(playerid, params[])
{
new playerb, string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /stealclothes [playerid]");
if(!IsALeone(playerid) && !IsACorleone(playerid) && !IsALaVice(playerid) && !IsAESF(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not a member of any criminal faction.");
if(IsPlayerNearPlayer(playerid, playerb, 2)) return SendClientMessage(playerid, COLOR_GREY, "You are not close enough at the player");
if(!IsPlayerKnocked(playerb))return SendClientMessage(playerid, COLOR_GREY, "The player isn't knocked");
{
SetPlayerSkin(playerid, PlayerInfo[playerb][pModel]);
SetPlayerSkin(playerb, 252);
format(string, sizeof(string), "* %s has stole the clothes from %s.", RPN(playerid), RPN(playerb));
SendNearbyMessage(playerid, 15, string, COLOR_LIGHTBLUE, COLOR_LIGHTBLUE, COLOR_LIGHTBLUE, COLOR_LIGHTBLUE, COLOR_LIGHTBLUE);
}
return 1;
}