Searching for CMD:?
#5

Your dialogresponse already defined , delete one of them i believe that you've copied my codes to your script and you've got the public DialogResponse. example
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])// that's public call back can only be define once.
{
    new sendername[MAX_PLAYER_NAME];
    new string[128];  
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])//here we got second call back of the same function so that's why you got the error.
{
    if(dialogid == DIALOG_WEAPONS)//checking if the dialog is the weapons one
    {
        if(response) //if responding 'pressed ok'
        {
            //if he choosed list item 0 means ak-47.
            if(listitem == 0)
            {
                if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid,-1,"You don't have enoght money to afford this weapon.'$3000'");//checking the player money.
                GivePlayerWeapon(playerid, 30); //giving him the weapon
            }
            if(listitem == 1) // if the player select list item 2 'm4'
            {
                if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid,-1,"You don't have enoght money to afford this weapon.'$3000'");//checking the player money.
                GivePlayerWeapon(playerid, 31); // Give them a m4
            }
        }
        return 1;
    }
 
    return 0;
}
Reply


Messages In This Thread
Searching for CMD:? - by aDo7 - 22.12.2013, 14:26
Re: Searching for CMD:? - by aDo7 - 22.12.2013, 14:57
Re: Searching for CMD:? - by SilentSoul - 22.12.2013, 15:06
Re: Searching for CMD:? - by aDo7 - 22.12.2013, 15:22
Re: Searching for CMD:? - by SilentSoul - 22.12.2013, 15:29

Forum Jump:


Users browsing this thread: 1 Guest(s)