mSelection + regular dialog , possibly?
#1

Hi, I trying to make something using mSelection and I wanna do like if you click the skin you choose that will open you a dialog with " are you sure you want to buy this clothes ? " "yes" "no".

Thanks!!
Reply
#2

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

Code improvements can be made.
Reply
#3

Thanks bud
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)