07.05.2013, 20:16
Hey I've just made a Dialog of weapons to buy and I want to know where should I define the : InRangeOfPoint - In Ammunation only , Than how to create in that cmd the InRangeOfPoint ? ? ?:
This is the Command Code :
This is the Dialog Code :
This is the Command Code :
Code:
CMD:buyweapon(playerid, params[]) { ShowPlayerDialog(playerid, 2812, DIALOG_STYLE_LIST, "Buy Gun", "SDPistol-2,000$\nShotgun-5,000$\nMP5-4,000$\nDeagle-30,000$\nM4[Limited 500 bullets]-60,000$\nAK47[Limited 500 bullets]-50,000$", "Select", "Cancel"); return 1; }
Code:
if(dialogid == BUYWEAPONMENU) // BUYWEAPONMENU { if(response) { if(listitem == 0) { GivePlayerValidWeapon(playerid, 23, 99999); GivePlayerCash(playerid, -2000); SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a silenced pistol!"); return 1; } if(listitem == 1) { GivePlayerValidWeapon(playerid, 25, 99999); GivePlayerCash(playerid, -5000); SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a shotgun!"); } if(listitem == 2) { GivePlayerValidWeapon(playerid, 29, 99999); GivePlayerCash(playerid, -4000); SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a MP5!"); } if(listitem == 3) { GivePlayerValidWeapon(playerid, 24, 99999); GivePlayerCash(playerid, -30000); SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a Deagle!"); } if(listitem == 4) { GivePlayerValidWeapon(playerid, 31, 500); GivePlayerCash(playerid, -60000); SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a M4 - 500 Bullets!"); } if(listitem == 5) { GivePlayerValidWeapon(playerid, 30, 99999); GivePlayerCash(playerid, -50000); SendClientMessageEx(playerid, COLOR_LIGHTBLUE," You have purchased a AK/47 - 500 Bullets!"); } } }