Quote:
Originally Posted by Konstantinos
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;
|
I like to use it as a string so that you can type the name also, but of course you have to make it supported.
Quote:
Originally Posted by ZachKnoxx
Yeah, that didn't work. For some reason my script isn't a big fan of plugins and includes.
|
All scripts act the same way and support the same stuff, why do you blame the script if its the user?
Download sscanf from
https://sampforum.blast.hk/showthread.php?tid=120356. Once you've downloaded it move the file to the following directory "/pawno/include/" then on the top of your gamemode add #include <sscanf2> and then complie.