SetSkin problem
#1

i made this command:
Код:
Код:
dcmd_setskin(playerid, params[])
{
    if(gPlayerInfo[playerid][PLAYER_LEVEL] < gCommands[VIP] && gPlayerInfo[playerid][PLAYER_LEVEL] > gCommands[VIP])
    {
        SendClientMessage(playerid, COLOR_ORANGE, "You must be an VIP to use that command!");
    }
    else
    {
        new tmp[256], index, id;
        tmp = strtok(params, index);

        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_ORANGE, "[SETSKIN] Usage: /setskin [SKIN ID]");
		}
        else
        {
            id = strval(tmp);
			if(id >= 300 && id <= -1)
			{
			SendClientMessage(playerid,COLOR_LIGHTBLUE,"Invalid ID, Valid IDS: 0-299");
			}
			else
			{
			SetPlayerSkin(playerid, id);
			}
            
        }
    }
    return 1;
}
but when you type -1 or 300+ number it doesnt show the message and playercrashes(Invalid skin id).
Reply


Messages In This Thread
SetSkin problem - by ttloko2 - 28.01.2012, 14:11
Re: SetSkin problem - by Hoborific - 28.01.2012, 14:13
Re: SetSkin problem - by Konstantinos - 28.01.2012, 14:15
Re: SetSkin problem - by ttloko2 - 28.01.2012, 14:18
Re: SetSkin problem - by Konstantinos - 28.01.2012, 14:43

Forum Jump:


Users browsing this thread: 1 Guest(s)