27.06.2016, 19:01
Skinchange command not working
Im trying to start zcmd, so i did everything but i have 1 warning
Line 11,
. everytime i try it it work but not changing my skin
Im trying to start zcmd, so i did everything but i have 1 warning
Code:
warning 225: unreachable code
Code:
if (dialogid == 1)
PHP Code:
#include <a_samp>
#include <a_players>
#include <zcmd>
#pragma tabsize 0
CMD:skin(playerid, listitem, response, dialogid, inputtext[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Skin Change", "Enter the skin id you wish to have below", "Confirm", "Cancel");
return 1;
if (dialogid == 1)
{
if(response)
{
new skinid, message[64];
skinid = strval(inputtext);
if(skinid < 0 || skinid > 299)
{
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Skin id may be between 0 and 299.");
}
else
{
SetPlayerSkin(playerid, skinid);
format(message, sizeof(message), "SERVER: You have changed your skin id to %d.", skinid);
SendClientMessage(playerid, 0xFFFFFFFF, message);
}
}
}
return 1;
}