10.08.2014, 18:17
So this CMD is not giving me any errors, yet for some reason when I do it IG nothing at all comes up. Not quite sure why, although I'm sure it's something really obvious and I'm just oblivious.
pawn Код:
CMD:setskin(playerid, params[])
{
new pID, value;
if(PlayerInfo[playerid][pAdmin] >= 2) return 0;
else if(sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setskin [id] [Skin ID]");
else if(value < 1 || value > 299 ) return SendClientMessage(playerid, COLOR_WHITE, "ERROR: Only skins 1-299");
else if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player Is Not Connected");
else
{
new string[128], string1[128], target[MAX_PLAYERS], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "You've set %s skin to %i", target, value);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Your skin has been set to %i by %s:", value, pName);
SendClientMessage(pID, COLOR_LIGHTBLUE, string1);
PlayerInfo[pID][pSkin] = value;
SetPlayerSkin(playerid, value);
}
return 1;
}