PHP код:
#include <a_samp>
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2 && response && listitem >= 0 && listitem <= 9) // WEAPONS 1
GivePlayerWeapon(playerid, listitem+1, 12000);
else if(dialogid == 3 && response) // WEAPONS 2
{
if(listitem >= 0 && listitem <= 5)
GivePlayerWeapon(playerid, listitem+11, 12000);
else if(listitem == 6)
GivePlayerWeapon(playerid, 18, 12000);
else if(listitem >= 7 && listitem <= 9)
GivePlayerWeapon(playerid, listitem+15, 12000);
}
else if(dialogid == 4 && response && listitem >= 0 && listitem <= 9) // WEAPONS 3
GivePlayerWeapon(playerid, listitem+25, 12000);
else if(dialogid == 5 && response) // WEAPONS 4
{
if(listitem == 0)
GivePlayerWeapon(playerid, 35, 12000);
else if(listitem >= 1 && listitem <= 7)
GivePlayerWeapon(playerid, listitem+36, 12000);
else if(listitem == 8)
GivePlayerWeapon(playerid, 46, 12000);
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/weapons1", true) == 0)
return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Weapons 1", "Brass Knucles \n Golf Club \n Nite Stick \n Knife \n Baseball Bat \n Shovel \n Pool Cue \n Katana \n Chainsaw \n Purple Dildo", "Select", "Cancel");
if(strcmp(cmdtext, "/weapons2", true) == 0)
return ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Weapons 2", "Small White Vibrator \n Large White Vibrator \n Silver Vibrator \n Flowers \n Cane \n Grenande \n Molotov Coctail \n 9mm \n Silenced 9mm \n Desert Eagle", "Select", "Cancel");
if(strcmp(cmdtext, "/weapons3", true) == 0)
return ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Weapons 3", "Shotgun \n Sawn-off Shotgun \n Combat Shotgun \n Micro SMG \n MP5 \n AK-47 \n M4 \n Tec9 \n Country Rifle \n Sniper Rifle", "Select", "Cancel");
if(strcmp(cmdtext, "/weapons4", true) == 0)
return ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Weapons 3", "Rocket Launcher \n Flamethrower \n Minigun \n Satchel Charge \n Detonator \n Spraycan \n Fire Extinguisher \n Camera \n Parachute ", "Select", "Cancel");
return 0;
}
2 - Explica novamente este problema do FS de carros.