Raised This Month: $51 Target: $400
 12% 

ZP Human Fastshooter


Post New Thread Reply   
 
Thread Tools Display Modes
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-26-2017 , 07:06   Re: ZP Human Fastshooter
Reply With Quote #11

Enable debug and post the error again, I'll try to fix this.
__________________

Last edited by edon1337; 02-26-2017 at 07:06.
edon1337 is offline
F0RCE
Senior Member
Join Date: Oct 2010
Old 02-26-2017 , 07:12   Re: ZP Human Fastshooter
Reply With Quote #12

I have debug enable for the whole server (in amxx.cfg)

It is debugged message:

L 02/26/2017 - 13:12:01: Invalid weapon id 0 L 02/26/2017 - 13:12:01: [AMXX] Displaying debug trace (plugin "zp_klasa_szybkostrzelny.amxx") L 02/26/2017 - 13:12:01: [AMXX] Run time error 10: native error (native "get_weaponname") L 02/26/2017 - 13:12:01: [AMXX] [0] zp_klasa_szybkostrzelny.sma::eventCurWeapon (line 45)
F0RCE is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 02-26-2017 , 07:30   Re: ZP Human Fastshooter
Reply With Quote #13

Ok my last guess would be this, also there was a mistake in your code, you need to use || not && at the is_user_alive && zp_core_is_zombie .... Also if you check is_user_alive , is_user_connected is not needed.
Code:
/*================================================================================         ----------------------------------     -*- [ZP] Class: Human: FastShoot -*-     ----------------------------------         This plugin is part of Zombie Plague Mod and is distributed under the     terms of the GNU General Public License. Check ZP_ReadMe.txt for details.     ================================================================================*/ #include <amxmodx> #include <zp50_class_human> #include <zp50_core> #include <engine> #include <fakemeta> // Raptor Human Attributes new const humanclass2_name[] = "Specjalista" new const humanclass2_info[] = "Szybciej strzela z broni" new const humanclass2_models[][] = { "leet" } const humanclass2_health = 75 const Float:humanclass2_speed = 1.0 const Float:humanclass2_gravity = 1.2 new g_HumanClassID public plugin_init() {     register_event("CurWeapon","eventCurWeapon", "b") } public eventCurWeapon(id) {     new weapon = read_data(2)     if(!is_user_alive(id) || zp_core_is_zombie(id) || zp_class_human_get_current(id) != g_HumanClassID)     return PLUGIN_CONTINUE         static Float:fSpeedMultiplier = 0.8;         new szWeaponName[64];     get_weaponname(weapon, szWeaponName, 63)         new iEnt = find_ent_by_owner(-1, szWeaponName, id)         if(!pev_valid(iEnt))     return PLUGIN_HANDLED;     while(iEnt > 0) {         set_pdata_float( iEnt, 46, ( get_pdata_float(iEnt, 46, 4) * fSpeedMultiplier), 4 );         set_pdata_float( iEnt, 47, ( get_pdata_float(iEnt, 47, 4) * fSpeedMultiplier), 4 );     }         return PLUGIN_CONTINUE } public plugin_precache() {     register_plugin("[ZP] Klasa Ludzi: Specjalista", ZP_VERSION_STRING, "ZP Dev Team")         g_HumanClassID = zp_class_human_register(humanclass2_name, humanclass2_info, humanclass2_health, humanclass2_speed, humanclass2_gravity)     new index     for (index = 0; index < sizeof humanclass2_models; index++)     zp_class_human_register_model(g_HumanClassID, humanclass2_models[index]) }
__________________
edon1337 is offline
F0RCE
Senior Member
Join Date: Oct 2010
Old 02-26-2017 , 08:40   Re: ZP Human Fastshooter
Reply With Quote #14

Seems to be working now!
Thank you!
F0RCE 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 19:40.


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