03.11.2015, 05:56
PHP код:
#define DIALOG_CONFIRM 1337
new WhatModelID[MAX_PLAYERS];
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
if(listid == skinlisthere)
{
if(response)
{
WhatModelID[playerid] = modelid;
ShowPlayerDialog(playerid, DIALOG_CONFIRM, 0, "Confirm", "Are you sure you want to buy these clothes?", "Yes", "No");
}
else
{
SendClientMessage(playerid, -1, "Cancelled");
}
return 1;
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_CONFIRM)
{
if(response)
{
SetPlayerSkin(playerid, WhatModelID[playerid]);
// rest of your code
}
else SendClientMessage(playerid, -1, "Cancelled");
}
return 1;
}