AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu Problem (https://forums.alliedmods.net/showthread.php?t=19545)

DarlD 10-19-2005 09:54

Menu Problem
 
Ok so basicly my plugin is supposed to give to the player health and armor. The players are supposed to buy it just like the shopmenu in wc3. Problem is that the players can still buy when they dont have the money!

here is my menu code:
Code:
public sayAP(id) {     new menu[191]     new keys2 = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)           format(menu, 190, "\yBuy Armor:^n\w^n1. Buy 10AP - 100$^n2. Buy 20AP - 200$^n3. Buy 30AP - 300$^n4. Buy 40AP - 400$^n5. Buy 50AP - 500$^n6. Buy 100AP - 1000$^n7. Buy 5000AP - 16000$")     show_menu(id, keys2, menu, -1, "BUY_ARMOR")       return PLUGIN_HANDLED }
And here is my menu options.
Code:
// Setting the buttons for the buy Armor menu public giveStuff2(id, key) {     switch(key)     {         case 0:           {             set_user_armor(id,(get_user_armor(id)+10))             cs_set_user_money(id,(cs_get_user_money(id)-100),1)         }         case 1:           {             set_user_armor(id,(get_user_armor(id)+20))             cs_set_user_money(id,(cs_get_user_money(id)-200),1)         }         case 2:           {             set_user_armor(id,(get_user_armor(id)+30))             cs_set_user_money(id,(cs_get_user_money(id)-300),1)         }         case 3:           {             set_user_armor(id,(get_user_armor(id)+40))             cs_set_user_money(id,(cs_get_user_money(id)-400),1)         }         case 4:           {             set_user_armor(id,(get_user_armor(id)+50))             cs_set_user_money(id,(cs_get_user_money(id)-500),1)         }         case 5:           {             set_user_armor(id,(get_user_armor(id)+100))             cs_set_user_money(id,(cs_get_user_money(id)-1000),1)         }         case 6:         {        set_user_armor(id,(get_user_armor(id)+5000))        cs_set_user_money(id,(cs_get_user_money(id)-16000),1)       } }     return PLUGIN_CONTINUE }

broertje 10-19-2005 10:35

hehe i made that :d,
check you're old topic,we are still on that

DarlD 10-19-2005 10:36

correction, i made that one you made the health one.

DarlD 10-19-2005 10:36

double-post...

broertje 10-19-2005 10:50

You Requested the hp one,i did it,then i did ap?

DarlD 10-19-2005 11:02

no i requested the hp one you made it and [ --<-@ ] Black Rose fixed it.

no matter

atomic 10-19-2005 11:09

yope

Code:
return PROBLEM_HANDLED

broertje 10-19-2005 11:11

hehe,atomic...


All times are GMT -4. The time now is 00:04.

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