Raised This Month: $ Target: $400
 0% 

[SMALL] Weapon Menu Edit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 11-01-2007 , 18:12   Re: [SMALL] Weapon Menu Edit
Reply With Quote #1

did register "catch the event when player presses a key to the menu"?
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Zetus
Junior Member
Join Date: Oct 2007
Old 11-01-2007 , 21:55   Re: [SMALL] Weapon Menu Edit
Reply With Quote #2

Yeah its a weapon menu for players ... but i have add a new weapon ... but when i get in section Rifles ... i cant get out =/ pressing 0 ... there is the original...


public Showguns(id) {
show_menu(id, Keysguns, " \y[28WL] BuyMenu \w $cost^n^n 1. Famas 2250^n 2. Defender 2000^n 3. AK-47 2500^n 4. M4A1 3100^n 5. Aug 3500^n 6. Krieg 552 3500^n 7. Krieg 550 4200^n 8. D3 5000^n^n\w9. \yBack^n", -1, "guns") // Display menu
}

public Pressedguns(id, key) {
/* Menu:
* [28WL] BuyMenu $cost
*
* 1. Flama 2250
* 2. Defender 2000
* 3. AK-47 2500
* 4. M4A1 3100
* 5. Aug 3500
* 6. Krieg 552 3500
* 7. Krieg 550 4200
* 8. D3 5000
* 9. Aup 4750
*
* 0. Back
*/

switch (key) {
case 0: { // 1
if((cs_get_user_money(id) - 2250) < 0)
{
client_print(id,print_center,"[Buy Menu] Sorry you do not have enough money")
Showguns(id)
return PLUGIN_HANDLED
}
give_item(id,"weapon_famas")
cs_set_user_bpammo(id,CSW_FAMAS,250)
cs_set_user_money(id, cs_get_user_money(id) - 2250)
Showbuyitem(id)
}
case 1: { // 2
if((cs_get_user_money(id) - 2250) < 0)
{
client_print(id,print_center,"[Buy Menu] Sorry you do not have enough money")
Showguns(id)
return PLUGIN_HANDLED
}
give_item(id,"weapon_galil")
cs_set_user_bpammo(id,CSW_GALIL,250)
cs_set_user_money(id, cs_get_user_money(id) - 2250)
Showbuyitem(id)
}
case 2: { // 3
if((cs_get_user_money(id) - 2500) < 0)
{
client_print(id,print_center,"[Buy Menu] Sorry you do not have enough money")
Showguns(id)
return PLUGIN_HANDLED
}
give_item(id,"weapon_ak47")
cs_set_user_bpammo(id,CSW_AK47,250)
cs_set_user_money(id, cs_get_user_money(id) - 2500)
Showbuyitem(id)
}
case 3: { // 4
if((cs_get_user_money(id) - 3100) < 0)
{
client_print(id,print_center,"[Buy Menu] Sorry you do not have enough money")
Showguns(id)
return PLUGIN_HANDLED
}
give_item(id,"weapon_m4a1")
cs_set_user_bpammo(id,CSW_M4A1,250)
cs_set_user_money(id, cs_get_user_money(id) - 3100)
Showbuyitem(id)
}
case 4: { // 5
if((cs_get_user_money(id) - 3500) < 0)
{
client_print(id,print_center,"[Buy Menu] Sorry you do not have enough money")
Showguns(id)
return PLUGIN_HANDLED
}
give_item(id,"weapon_aug")
cs_set_user_bpammo(id,CSW_AUG,250)
cs_set_user_money(id, cs_get_user_money(id) - 3500)
Showbuyitem(id)
}
case 5: { // 6
if((cs_get_user_money(id) - 3500) < 0)
{
client_print(id,print_center,"[Buy Menu] Sorry you do not have enough money")
Showguns(id)
return PLUGIN_HANDLED
}
give_item(id,"weapon_sg552")
cs_set_user_bpammo(id,CSW_SG552,250)
cs_set_user_money(id, cs_get_user_money(id) - 4200)
Showbuyitem(id)
}
case 6: { // 7
if((cs_get_user_money(id) - 3500) < 0)
{
client_print(id,print_center,"[Buy Menu] Sorry you do not have enough money")
Showguns(id)
return PLUGIN_HANDLED
}
give_item(id,"weapon_sg550")
cs_set_user_bpammo(id,CSW_SG550,250)
cs_set_user_money(id, cs_get_user_money(id) - 4200)
Showbuyitem(id)
}
case 7: { // 8
if((cs_get_user_money(id) - 3500) < 0)
{
client_print(id,print_center,"[Buy Menu] Sorry you do not have enough money")
Showguns(id)
return PLUGIN_HANDLED
}
give_item(id,"weapon_g3sg1")
cs_set_user_bpammo(id,CSW_G3SG1,250)
cs_set_user_money(id, cs_get_user_money(id) - 4200)
Showbuyitem(id)
}
case 8: { // 9
Showbuyitem(id)
}
}
return PLUGIN_CONTINUE
}
Zetus is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:15.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode