Raised This Month: $ Target: $400
 0% 

Bad Load Of My Own Plugin On Server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
broertje
Senior Member
Join Date: Mar 2005
Old 10-19-2005 , 12:25   Bad Load Of My Own Plugin On Server
Reply With Quote #1

Code:
#include <amxmodx>   #include <amxmisc>   #include <fun>   #include <cstrike>   #define PLUGIN "BuyMenus" #define VERSION "1.0" #define AUTHOR "Broertje" public plugin_init() {       register_plugin("Buymenus", "1.0", "Broertje")     register_clcmd("say /buyhealth", "sayHP", 0, "- Show Menu To buy Hp!!!")     register_clcmd("say /buyarmor", "sayAP", 0, "- Show Menu To buy Ap!!!")     register_clcmd("say /buymisc", "sayMisc", 0, "- Show Menu To buy Things!!!")     register_menucmd(register_menuid("BUY_HEALTH"),1023,"giveStuff");     register_menucmd(register_menuid("BUY_ARMOR"),1023,"giveStuff2");     register_menucmd(register_menuid("BUY_MISC"),1023,"giveStuff3"); } public sayMisc(id)     {     new menu[192]     new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)           format(menu, 191, "\yBuy:^n\w^n1. Buy 3 Frags - 3000$^n2. Buy -3 Deaths - 3000$^n3. Buy Low Gravity - 500$^n4. Buy Silent FootSteps - 500$")     show_menu(id, keys, menu, -1, "BUY_MISC")     return PLUGIN_HANDLED } public sayAP(id)     {     new menu[192]     new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)           format(menu, 191, "\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$")     show_menu(id, keys, menu, -1, "BUY_HEALTH")     return PLUGIN_HANDLED } public sayHP(id)     {     new menu[192]     new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)           format(menu, 191, "\yBuy Health:^n\w^n1. Buy 10HP - 100$^n2. Buy 20HP - 200$^n3. Buy 30HP - 300$^n4. Buy 40HP - 400$^n5. Buy 50HP - 500$^n6. Buy 100HP - 1000$")     show_menu(id, keys, menu, -1, "BUY_HEALTH")     return PLUGIN_HANDLED } public giveStuff3(id, key)     {     new money = cs_get_user_money(id)     new frags = get_user_frags(id)     new deaths = get_user_deaths(id)     switch(key)     {         case 0:         {             if (money > 2999) {                 set_user_frags(id, frags + 3)                 cs_set_user_money(id, money - 3000, 1)             }         }         case 1:         {             if (money > 2999) {                 set_user_deaths(id, deaths - 3)                 cs_set_user_money(id, money - 3000, 1)             }         }         case 2:         {             if (money > 499) {                 set_user_gravity(id,0.5)                 cs_set_user_money(id, money - 500, 1)             }         }         case 3:         {             if (money > 399) {                 set_user_footsteps(id, 1)                 cs_set_user_money(id, money - 500, 1)             }         }     }     return PLUGIN_HANDLED; } public giveStuff(id, key)     {     new money = cs_get_user_money(id)     new health = get_user_health(id)     switch(key)     {         case 0:         {             if (money > 99) {                 set_user_health(id, health + 10)                 cs_set_user_money(id, money - 100, 1)             }         }         case 1:         {             if (money > 199) {                 set_user_health(id, health + 20)                 cs_set_user_money(id, money - 200, 1)             }         }         case 2:         {             if (money > 299) {                 set_user_health(id, health + 30)                 cs_set_user_money(id, money - 300, 1)             }         }         case 3:         {             if (money > 399) {                 set_user_health(id, health + 40)                 cs_set_user_money(id, money - 400, 1)             }         }         case 4:         {             if (money > 499) {                 set_user_health(id, health + 50)                 cs_set_user_money(id, money - 500, 1)             }         }         case 5:         {             if (money > 999) {                 set_user_health(id, health + 100)                 cs_set_user_money(id, money - 1000, 1)             }         }     }     return PLUGIN_HANDLED;      }     public giveStuff2(id, key)     {     new money = cs_get_user_money(id)     new armor = get_user_armor(id)     switch(key)     {         case 0:         {             if (money > 99) {                 set_user_armor(id, armor + 10)                 cs_set_user_money(id, money - 100, 1)             }         }         case 1:         {             if (money > 199) {                 set_user_armor(id, armor + 20)                 cs_set_user_money(id, money - 200, 1)             }         }         case 2:         {             if (money > 299) {                 set_user_armor(id, armor + 30)                 cs_set_user_money(id, money - 300, 1)             }         }         case 3:         {             if (money > 399) {                 set_user_armor(id, armor + 40)                 cs_set_user_money(id, money - 400, 1)             }         }         case 4:         {             if (money > 499) {                 set_user_armor(id, armor + 50)                 cs_set_user_money(id, money - 500, 1)             }         }         case 5:         {             if (money > 999) {                 set_user_armor(id, armor + 100)                 cs_set_user_money(id, money - 1000, 1)             }         }     }     return PLUGIN_HANDLED; }
It Says Bad Load,But When I Compile I Have 0 Errors,And Modules Are Enabled
broertje is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 10-19-2005 , 12:31  
Reply With Quote #2

im no good wid manus but i think...
Code:
public giveStuff3(id, key)       {       new money = cs_get_user_money(id)       new frags = get_user_frags(id)       new deaths = get_user_deaths(id)     switch(key)       {           case 0:           {               if (money > 2999) {                   set_user_frags(id, frags + 3)                   cs_set_user_money(id, money - 3000, 1)               }           }           case 1:           {               if (money > 2999) {                   set_user_deaths(id, deaths - 3)                   cs_set_user_money(id, money - 3000, 1)               }           }           case 2:           {               if (money > 499) {                   set_user_gravity(id,0.5)                 cs_set_user_money(id, money - 500, 1)               }           }           case 3:           {               if (money > 399) {                   set_user_footsteps(id, 1)                 cs_set_user_money(id, money - 500, 1)             }         }       }     return PLUGIN_HANDLED; }
4 cases
BUT...
Code:
public sayMisc(id)       {       new menu[192]       new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)           format(menu, 191, "\yBuy:^n\w^n1. Buy 3 Frags - 3000$^n2. Buy -3 Deaths - 3000$^n3. Buy Low Gravity - 500$^n4. Buy Silent FootSteps - 500$")       show_menu(id, keys, menu, -1, "BUY_MISC")       return PLUGIN_HANDLED   }
6 btns?

am i right?
as i said not good wid menus... but try it

change
Code:
new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)
to:
Code:
new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)
??
[ --<-@ ] Black Rose is offline
broertje
Senior Member
Join Date: Mar 2005
Old 10-19-2005 , 12:37  
Reply With Quote #3

So I Deleted 2btns,Still Not Working
broertje is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 10-19-2005 , 12:39  
Reply With Quote #4

Place "debug" on the same line and after your plugin. Then, restart your map. Then, look in the most recent AMXX log and see what it says re: your bad load.
Brad is offline
broertje
Senior Member
Join Date: Mar 2005
Old 10-19-2005 , 12:42  
Reply With Quote #5

set_user_deaths check modules.ini
broertje is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 10-19-2005 , 12:42  
Reply With Quote #6

Quote:
Originally Posted by broertje
So I Deleted 2btns,Still Not Working
u sure u did it on the right place...?
[ --<-@ ] Black Rose is offline
broertje
Senior Member
Join Date: Mar 2005
Old 10-19-2005 , 12:45  
Reply With Quote #7

thats not the error,its new deaths = get_user_deaths(id)
we do't need that i think,so i can just delete it,will try it now
broertje is offline
broertje
Senior Member
Join Date: Mar 2005
Old 10-19-2005 , 12:47  
Reply With Quote #8

i'm just going to delete that option,error is still there
broertje is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 10-19-2005 , 12:47  
Reply With Quote #9

okey... yea i thought that might b to small problem to make it bad load...
[ --<-@ ] Black Rose is offline
broertje
Senior Member
Join Date: Mar 2005
Old 10-19-2005 , 12:49  
Reply With Quote #10

Woooohooo,its working now
broertje 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 00:04.


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