What did I do wrong?
#5

By doing this:
pawn Код:
new
    tmp[3],
    skinid = strval(tmp);
skinid will always be 0.

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;
Reply


Messages In This Thread
What did I do wrong? - by ZachKnoxx - 20.05.2014, 00:27
Re: What did I do wrong? - by SickAttack - 20.05.2014, 00:53
AW: What did I do wrong? - by Madd92 - 20.05.2014, 00:55
Re: AW: What did I do wrong? - by ZachKnoxx - 20.05.2014, 11:32
Re: What did I do wrong? - by Konstantinos - 20.05.2014, 11:43
Re: What did I do wrong? - by ZachKnoxx - 20.05.2014, 11:46
Re: What did I do wrong? - by SickAttack - 20.05.2014, 23:34
Re: What did I do wrong? - by ZachKnoxx - 20.05.2014, 23:59
Re: What did I do wrong? - by SickAttack - 21.05.2014, 00:05
Re: What did I do wrong? - by ZachKnoxx - 21.05.2014, 00:09

Forum Jump:


Users browsing this thread: 4 Guest(s)