Raised This Month: $ Target: $400
 0% 

Is this a bug? - I need some help with this plugin -


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hip_hop_x
Senior Member
Join Date: Apr 2006
Old 01-12-2007 , 16:16   Is this a bug? - I need some help with this plugin -
Reply With Quote #1

plugin code:
Code:
#include <amxmodx> #include <amxmisc> #include <fun> new p_cvar1 public plugin_init() {     register_plugin("HXhl", "1a", "Hip_hop_x")         register_clcmd( "HXhl","hlmenu")         p_cvar1 = register_cvar("amx_HXhl", "1")         register_clcmd("say /chose", "HXchose", 0) } public HXchose(id) {     if(get_pcvar_num(p_cvar1) != 1) {         return PLUGIN_HANDLED     }     set_task(0.1, "hlmenu")         return PLUGIN_HANDLED } public hlmenu(id) {     new menu = menu_create("\yHalf-life Power Menu!:", "menu_handler")         menu_additem(menu, "\wPorc Gravity#1", "1", 0)     menu_additem(menu, "\wZerg Speed#2", "2", 0)     menu_additem(menu, "\wCino Health #3", "3", 0)     menu_additem(menu, "\wMegaX #4", "4", ADMIN_ADMIN)             menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)         //Menu display     menu_display(id, menu, 0) } public menu_handler(id, menu, item) {     if (item == MENU_EXIT)     {         menu_destroy(menu)         //aici voi adauga sa nu mai apara         return PLUGIN_HANDLED     }         new data[6], iName[64]     new access, callback         menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)             new key = str_to_num(data)         switch(key)     {         case 1:{             client_print(id, print_chat, "[ HXhl ] You Selected Porc Gravity")                         set_user_gravity(id, 0.7)             menu_destroy(menu)             return PLUGIN_HANDLED         }         case 2:{             client_print(id, print_chat, "[ HXhl ] You Selected Zerg Speed")             set_user_maxspeed(id, get_user_maxspeed(id) + 20)                         menu_destroy(menu)             return PLUGIN_HANDLED         }         case 3:{             client_print(id, print_chat, "\r[ HXhl ] You Selected Cino Health")             set_user_health(id, get_user_health(id) + 25)                         menu_destroy(menu)             return PLUGIN_HANDLED         }         case 4:{             if(!is_user_alive) {                 return PLUGIN_HANDLED             }             client_print(id, print_chat, "[ HXhl ] MegaX")             set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,25)             set_user_maxspeed(id, get_user_maxspeed(id) + 50)             set_user_health(id, get_user_health(id) + 95)                         menu_destroy(menu)             return PLUGIN_HANDLED         }     }     menu_destroy(menu)     return PLUGIN_HANDLED }

When I'm in gameserer and I say /chose, server crashes (half-life gameserver). This plugins doesn't work with a half-life dedicated gameserver, but works with a counter-strike dedicated server. Anyone knows how to fix this?

Last edited by hip_hop_x; 01-13-2007 at 11:06.
hip_hop_x is offline
Send a message via MSN to hip_hop_x Send a message via Yahoo to hip_hop_x
 


Thread Tools
Display Modes

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 22:23.


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