20.05.2014, 11:43
By doing this:
skinid will always be 0.
Use sscanf like SickAttack did but without a string.
pawn Код:
new
tmp[3],
skinid = strval(tmp);
Use sscanf like SickAttack did but without a string.
pawn Код:
new
skinid;
if (sscanf(text, "i", skinid)) return SendClientMessage(playerid, COLOR_RED, "Use a number for the skin ID.");
if (!(1 <= skinid <= 299))
{
SendClientMessage(playerid, COLOR_RED, "[REGISTER:] Invalid skin, 1-299");
SendClientMessage(playerid, COLOR_RED, "[NOTE:] Some skins are restricted.");
return 1;
}
SetPlayerSkin(skinid);
SendClientMessage(playerid, COLOR_WHITE, "[REGISTER:] You have now set your skin.");
RegistrationStep[playerid] = 0;
TogglePlayerControllable(playerid,1);
PlayerInfo[playerid][pRegistered] = 1;