29.05.2010, 02:07
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
if(dialogid == D_CHANGE_SKIN)
{
if(!inputtext[0])
{
SendClientMessage(playerid, COLOR, "Type the skin ID you want!");
ShowPlayerDialog(playerid, D_CHANGE_SKIN, DIALOG_STYLE_INPUT, "Skin", "Type in your wanted skin id into the input box.", "Change", "Cancel");
}
else if(IsValidSkin(strval(inputtext)) == 0)
{
SendClientMessage(playerid, COLOR, "Invalid skin ID!");
ShowPlayerDialog(playerid, D_CHANGE_SKIN, DIALOG_STYLE_INPUT, "Skin", "Type in your wanted skin id into the input box.", "Change", "Cancel");
return 1;
}
SetPlayerSkin(playerid, strval(inputtext));
SetSpawnInfo(playerid, 0, strval(inputtext), 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0); // recommended
SendClientMessage(playerid, "You have changed your skin!");
}
}
return 1;
}