12.04.2012, 00:14
Alright, so I am making a script to where administrators over the level of 2 may set other player's skin for my RP server. I have a code that sets a skin, but can only seem to set the skin to 0, I am not sure why, here's the code...
pawn Код:
if (strcmp("/setskin", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
if(isnull(cmdtext))
{
SendClientMessage(playerid, 0xFFFFFFFF, "SYNTAX: /setskin [Playerid] [ID]");
}
else
{
new id, Value, string[128];
if(IsInvalidSkin(Value))
{
SendClientMessage(playerid, 0xFFFFFFFF, "Invalid skin!");
}
else
{
format(string, sizeof(string), "You have set %s's skin to %d.", GetName(id), Value);
SendClientMessage(playerid, 0xFFFFFFFF, string);
SetPlayerSkin(Value, id);
}
}
}
else
{
SendClientMessage(playerid, 0x4F4F4FFF, "ERROR: You are unauthorized to use this command!");
}
return 1;
}