22.12.2013, 15:29
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;
}