14.09.2016, 13:42
There should be 1 "return 1;" and 1 "return 0;". You should fix your indentations!
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 999)//dialog id response
{
if(response)
{
if(listitem == 0)//the listitem0, defines the number one option of the dialog
{
if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
{
SendClientMessage(playerid, COLOR_WHITE, "You chose the Ballas as your class.");
ShowPlayerDialog(playerid, 998, DIALOG_STYLE_MSGBOX, "{6EF83C}Ballas Objective:", "{F81414}Fuck them Grove mothafuckas up!", "A'ight","");
gPlayerClass[playerid] = Ballas;
PickedClass[playerid] = 1;
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid, 1);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 70);//deagle
}
}
if(listitem == 1)//the listitem1, defines the number one option of the dialog
{
SendClientMessage(playerid, COLOR_WHITE, "You chose Grove as your class.");
ShowPlayerDialog(playerid, 998, DIALOG_STYLE_MSGBOX, "{6EF83C}Grove Objective:", "{F81414}Fuck them Ballas pussies up!", "A'ight","");
gPlayerClass[playerid] = Grove;
PickedClass[playerid] = 1;
RemovePlayerMapIcon(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid, 1);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 70);//deagle
}
return 1;
}
return 0;
}