[SMALL] Weapon Menu Edit
Helo ! Guys .. first way sorry 4 my bad english ... i have edited a plugin ... in the section of the WEAPONS MENU ... but I am doing some erro because I CANT GET OUT OF THE MENU OF RIFLES PLEASE SOMEONE HELP ME
HE WE GO : 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 9. Aup 4750^n^n\w0. \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 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_awp") cs_set_user_bpammo(id,CSW_AWP,250) cs_set_user_money(id, cs_get_user_money(id) - 4750) Showbuyitem(id) } case 9: { // 0 Showbuyitem(id) } } return PLUGIN_CONTINUE } Waiting Reply please someone help me :cry::cry::cry::cry: |
Re: [SMALL] Weapon Menu Edit
did register "catch the event when player presses a key to the menu"?
|
Re: [SMALL] Weapon Menu Edit
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 } |
Re: [SMALL] Weapon Menu Edit
whats the Keysguns
show us your WHOLE code inside [small] [ /small] |
Re: [SMALL] Weapon Menu Edit
say menu ... to get in ... he is the first menu
public Showbuyitem(id) { show_menu(id, Keysbuyitem, "\y [28WL] BuyMenu \w^n^n 1. Handgun^n 2. Shotgun^n 3. Sub-Machine Gun^n 4. Rifle^n 5. Machine Gun^n^n 6. Primary weapon ammo 1000^n 7. Secondary weapon ammo 600^n^n 8. Equipment^n^n 0. \yExit^n", -1, "buyitem") // Display menu } public Pressedbuyitem(id, key) { /* Menu: * [28WL] BuyMenu * * 1. Handgun * 2. Shotgun * 3. Sub-Machine Gun * 4. Rifle * 5. Machine Gun * * 6. Primary weapon ammo * 7. Secondary weapon ammo * * 8. Equipment * * 0. Exit */ switch (key) { case 0: { // 1 if(!is_user_alive(id)) { client_print(id,print_chat,"Your not alive") return PLUGIN_HANDLED } Showhandgun(id) } case 1: { // 2 if(!is_user_alive(id)) { client_print(id,print_chat,"Your not alive") return PLUGIN_HANDLED } Showshotgun(id) } case 2: { // 3 if(!is_user_alive(id)) { client_print(id,print_chat,"Your not alive") return PLUGIN_HANDLED } Showsubgun(id) } case 3: { // 4 if(!is_user_alive(id) ) { client_print(id,print_chat,"Your not alive") return PLUGIN_HANDLED } Showguns(id) } case 4: { // 5 if(!is_user_alive(id)) { client_print(id,print_chat,"Your not alive") return PLUGIN_HANDLED } Showmachinegun(id) } case 5: { // 6 if(!is_user_alive(id)) { client_print(id,print_chat,"Your not alive") return PLUGIN_HANDLED } if((cs_get_user_money(id) - 100) < 0) { client_print(id,print_center,"[Buy Menu] Sorry you do not have enough money") return PLUGIN_HANDLED } cs_set_user_money(id, cs_get_user_money(id) - 100) Showbuyitem(id) priammo(id) } case 6: { // 7 if(!is_user_alive(id)) { client_print(id,print_chat,"Your not alive") return PLUGIN_HANDLED } if((cs_get_user_money(id) - 100) < 0) { client_print(id,print_center,"[Buy Menu] Sorry you do not have enough money") return PLUGIN_HANDLED } cs_set_user_money(id, cs_get_user_money(id) - 100) Showbuyitem(id) secammo(id) } case 7: { // 8 if(!is_user_alive(id)) { client_print(id,print_chat,"Your not alive") return PLUGIN_HANDLED } Showequipment(id) } case 9: { // 0 client_print(id,print_chat,"[BuyMenu] Type menu for this menu again.") } } return PLUGIN_CONTINUE } |
Re: [SMALL] Weapon Menu Edit
someone tell him what the WHOLE code means and how to use [small]...
|
Re: [SMALL] Weapon Menu Edit
1 Attachment(s)
I'm Sorry about of the problems ... but please man help me fix this ... i get in the rifles section and I cant get out Pressing 0 (Zero) ... Please help me +Karma for You ^^ thanks
_____________________________________________ ____ There here is All the code Sma is in the mensage plx help me T_T |
Re: [SMALL] Weapon Menu Edit
line 58
#define Keysguns (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1< <6)|(1<<7)|(1<<8 ) // Keys: 123456789 missing key 0 to #define Keysguns (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1< <6)|(1<<7)|(1<<8 )|(1<<9) // Keys: 1234567890 |
Re: [SMALL] Weapon Menu Edit
Thank You Very much man ... you can help me ? in another problem plx .. is very simples i got put the link here ok? ^^
___________________________________ http://forums.alliedmods.net/showthr...062#post549062 |
| All times are GMT -4. The time now is 01:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.