#include <a_samp>
#define DIALOG_BRW 112911
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Firetruck system by firemanjv");
print("--------------------------------------\n");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/fdtruck", true) == 0)
{
ShowPlayerDialog(playerid, DIALOG_BRW, DIALOG_STYLE_LIST, "FD Truck Menu", "Chainsaw \n Shovel \n Fire Extinguisher \n Ladder \n Fire Suite \n Medic Suite \n First AID kit", "Select", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 112911)
{
if(response)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, 9, 1500);
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 6, 500);
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 42, 5100);
}
if(listitem == 3)
{
}
if(listitem == 4)
{
SetPlayerSkin(playerid, 277);
return 1;
}
if(listitem == 5)
{
SetPlayerSkin(playerid, 275);
return 1;
}
if(listitem == 6)
{
SetPlayerHealth(playerid, 100);
return 1;
}
}
}
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
ShowPlayerDialog(playerid, DIALOG_BRW, DIALOG_STYLE_LIST, "FD Truck Menu", "Chainsaw \n Shovel \n Fire Extinguisher \n Ladder \n Fire Suite \n Medic Suite \n First AID kit", "Select", "Cancel");
//The Dialog does not know what ID it is.
ShowPlayerDialog(playerid, 112911, DIALOG_STYLE_LIST, "FD Truck Menu", "Chainsaw \n Shovel \n Fire Extinguisher \n Ladder \n Fire Suite \n Medic Suite \n First AID kit", "Select", "Cancel");
//Shows the ID
oh i thought because id did #define DIALOG_BRW 112911 it was correct but thanks for help
|
playerid The ID of the player to show the dialog to. dialogid An ID to assign this dialog to, so responses can be processed. Max dialogid is 32767. Using negative values will close any open dialog. style The style of the dialog. caption[] The title at the top of the dialog. The length of the caption can not exceed more than 64 characters before it starts to cut off. info[] The text to display in the dialog. Use \n to start a new line and \t to tabulate. button1[] The text on the left button. button2[] The text on the right button. Leave it blank to hide it. Returns This function doesn't return a specific value |
Wiki: Max dialogid is 32767. |