| closeddod_flamethrower and dod_shotgun |
| Started by meathead on 05-18-2013, 01:08 PM |
Threads: 23
Joined: Aug 2007
With all the changes to amx,mm and dod trying to fix these 2 plugins. rnShotgun working but unlimited ammo( not all bad). lol. No errors in debug mode but I think its related to the error im getting in flamethrower. Both have messed up ammo hud displays.rnrn
Start of error session.rnL 05/18/2013 - 10:50:04: Info (map "dod_avalanche") (file "addons/amxmodx/logs/error_20130518.log")rnL 05/18/2013 - 10:50:04: [DODX] Invalid player 1rnL 05/18/2013 - 10:50:04: [AMXX] Displaying debug trace (plugin "dod_flamethrower.amxx")rnL 05/18/2013 - 10:50:04: [AMXX] Run time error 10: native error (native "dod_get_user_class")rnL 05/18/2013 - 10:50:04: [AMXX] [0] dod_flamethrower.sma::is_class (line 837)rnL 05/18/2013 - 10:50:04: [AMXX] [1] dod_flamethrower.sma::func_HamSpawn (line 474)rnrnrnLine 837 rn
is_class( id ) {rn new class = dod_get_user_class( id );rn rn if( g_isClass[id] &&rn (class == DODC_BAZOOKA || class == DODC_PIAT || class == DODC_PANZERJAGER) )rn return 1;rn rn return 0;rn}rnrnline 474rn
public func_HamSpawn(id) {rn if( plugin_enabled() )rn {rn if( is_class(id) )rn {rn // Set his weapon to a flamethrowerrn g_holding[id] = true;rn has_flamethrower( id, _, 1 );rn set_visuals( id );rn //remove_gear( id );rn // Set Ammorn clip_ammo( id, get_pcvar_num(p_ammo) );rn alter_hud_ammo( id );rn set_smg_ammo( id, 0 );rn }rn }rn}rnrn where do I find the new offsets to confirm these are still correct?rnrn
#define OFFSET_WPNID 91rn#define OFFSET_CLIPAMMO 108rn#define OFFSET_CLASS 366rn#define OFFSET_RCLASS 367rn#define OFFSET_SMGAMMO 56rn#define OFFSET_LINUX 5
Threads: 103
Joined: May 2005
if I recall, I tended to get invalid player errors on the ham spawn if I didnt check if the id was connected and that will also make sure the call to is_class is for a valid player id..nnas for the pdata offsets, i used to just use a simple plugin i wrote to print out the values for a range of offsets then a command to change the value of a specific offset to see if it was the offset i was looking for, was pretty sloppy and time consuming tho
Threads: 23
Joined: Aug 2007
Thanks DO. That appears to have fixed the error. Now Ill see about getting the hud displays working again. Shotgun never needs reloaded and ammo hud is 2 30 clip mags that never change?, and flamethrower ammo hud shows a single bullet constantly. I'm guessing its the offset's have changed or something?
Threads: 103
Joined: May 2005
hmm... is this on linux or windows? If its windows I'll try and setup a server on my pc and take a look at the offsetsnn>> and also if its linux, does the same thing happen if you start up like a windows server/listenserver? if i recall, linux tended to be a pain with getting the right offsets
Threads: 23
Joined: Aug 2007
Linux off course. AAC Clan told him how to get them to run. Linux offset is from 4 to 5. n
and also if its linux, does the same thing happen if you start up like a windows server/listenserver?nnCan't answer that, have never ran an amx version on my pc. I did finally install amx studio though, so I could compile with dodstocks.nnIf you do play around with it, make sure you get the updated hamsandwich_amxx_i386.so. File size should be 576,148
Threads: 23
Joined: Aug 2007
L 06/15/2013 - 08:31:43: [AMXX] Run time error 4: index out of bounds nL 06/15/2013 - 08:31:43: [AMXX] [0] dod_shotgun.sma::fwd_SetModel (line 419)nnDo I need another is user connected here?nnpublic fwd_SetModel( ent, const model[] ) {n if( plugin_enabled() )n {n new owner = pev( ent, pev_owner );n if( pev_valid(ent) && (owner && g_holding[owner])n && (equal(model, strings[w_amer]) || equal(model, strings[w_brit]) || equal(model, strings[w_axis])) )n {n engfunc( EngFunc_SetModel, ent, strings[w_specialwpn] );n return FMRES_SUPERCEDE;n }n }n return FMRES_IGNORED;n}

