11.09.2012, 16:11
Hey i have seemed to try everything that i can think of and these are the peices of code that make it crash.
and
I am really stuck on what to do any help would be awesome!
PHP код:
CMD:faction(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "Faction Commands","LSPD\nFBI","Okay","Close");
}
return 1;
}
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new pDialog[512];
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 999:// Our dialog!
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
ShowPlayerDialog(playerid, HELP6, DIALOG_STYLE_MSGBOX, "LSPD","/door (/r)adio (/d)epartments (/m)egaphone (/su)spect /lspd /mdc /detain /arrest /wanted /cuff /tazer /showbadge\n/leofrisk /take /ticket (/gov)ernment /deliver /clothes /invite /giverank /deployspikes /deletespike(s)",pDialog,"okay","Close");
}
}
case 1: // The second item listed
{
SendClientMessage(playerid, COLOR_GREEN, "FBI to go here.");
}
}
}
}
}
return 1;
}