Under On Player Command
pawn Код:
if(!strcmp("/changeskin", cmd, false, 9))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438)) // Change it to Binco coordination
{
ShowPlayerDialog( playerid, 1500, DIALOG_STYLE_INPUT, "CLOTHES CHANGING", "Write here the skin ID you want to change", "Change", "Cancel" );
}
else
{
SendClientMessage(playerid, COLOR_RED, "You have to be in Binco");
}
return 1;
}
Under OnDialogResponse
pawn Код:
if(dialogid == 1500)
{
if(response == 1)
{
if(!strlen(inputtext))
{
SendClientMessage(playerid, 0xFFFFFFFF, "You didn't write anything!");
ShowPlayerDialog( playerid, 1500, DIALOG_STYLE_INPUT, "CLOTHES CHANGING", "Write here the skin ID you want to change", "Change", "Cancel" );
}
else
{
SetPlayerSkin(playerid, inputtext);
}
}
}
However, you got to make it restricted to SAMP available skins, or else, the client/server will be crashed.