16.03.2013, 16:56
Hello i have created a dialog
but when i go ingame it doesn't show when i type the cmd
Code-
And some other thing how can i make this that it only work when you stand near a firetruck ( ladder/engie) or Ambulance
but when i go ingame it doesn't show when i type the cmd
Code-
PHP код:
#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;
}