AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Is this a bug? - I need some help with this plugin - (https://forums.alliedmods.net/showthread.php?t=49769)

hip_hop_x 01-12-2007 16:16

Is this a bug? - I need some help with this plugin -
 
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?

hip_hop_x 01-14-2007 11:57

Re: Is this a bug? - I need some help with this plugin -
 
Nobody knows?

slmclarengt 01-14-2007 20:19

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

Originally Posted by hip_hop_x (Post 427129)
Nobody knows?

1) Please don't bump your own topic after only 2 days. The average wait time should be 2 weeks.
2) If I remember correctly, I thought I heard a problem with HP not adding in Half-life, but I may be wrong and flaming of this misconception is useless.
3) Your code *seems* fine even though I can't read whatever language that is :-).
4) Check your server error logs located in "$moddir/addons/amxmodx/logs/errorlog_DATE.log" on whatever day you executed that. Post the results of errors relating to your plugin.

Slmclarengt

Emp` 01-14-2007 22:40

Re: Is this a bug? - I need some help with this plugin -
 
Code:
    set_task(0.1, "hlmenu")
Code:
public hlmenu(id)

hip_hop_x 01-15-2007 14:30

Re: Is this a bug? - I need some help with this plugin -
 
in the error log I found Run time error 10 (plugin "HXhlmenu.amxx") (native "precache_model"), but when I say /chat hlds.exe crashes, and the message written there is: MSG_ONE or MESSAGE_ENTITY no reliable

Anyone has a fix?

SweatyBanana 01-16-2007 16:11

Re: Is this a bug? - I need some help with this plugin -
 
PHP Code:

set_task(0.1"hlmenu"

->

PHP Code:

set_task(0.1"hlmenu"id


hip_hop_x 01-17-2007 12:15

Re: Is this a bug? - I need some help with this plugin -
 
Thanks a lot SweatyBanana, you fixed my plugin. Thanks guys for help, topic can be closed.

aDr. 01-17-2007 12:51

Re: Is this a bug? - I need some help with this plugin -
 
Si ce face pluginul asta ? poate il bag si eu pe serverul meu (this reply is only for hip_hop_x)


All times are GMT -4. The time now is 22:23.

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