| closedsave custom-setting to an weapon-entity |
| Started by ghzero on 03-23-2009, 04:14 PM |
Threads: 42
Joined: Sep 2007
hello,rnrnmy idea: to do remember an weapon that was damaged by underwater-moving of player.rnrnhow can I save an custom-setting to an existing weapon-entity ?! (to check the entity after wpn_pickup for it)rnand do you know if that can result sideeffects to dod?!
Threads: 103
Joined: May 2005
you could probably get the weapon entity and save a value to like one of the pev_iuser# valuesnnsimilar to how dod_weaponjam saves whether a weapon is jammed even after a player drops it and another player picks it up
Threads: 42
Joined: Sep 2007
allright, I'll take a look at that plugin to learn more about it..rnrndo you know if it can abuse the dod engine?! (if I save something like that to an entity)
Threads: 103
Joined: May 2005
well i havent noticed any issues when using the iuser (or fuser etc...) parts of weapon entitiesnnni dont remember completely, but i think one of them is used for the players stamina for player entities, but im yet to see them used by anything for weapons
Threads: 42
Joined: Sep 2007
allright in your plugin you use some offsets to save/load your flags.rnrncan I give an new offset to an weapon-entity or have(must) I use an existing and have to look that it dont abuse other things?
Threads: 103
Joined: May 2005
every entity has a set amount of these..nnfor integers: (these im pretty sure dod may use ALL of them for player entities, dont remember exactly what is stored in each one tho... and as far as non-player entities go, im not sure but have not seen them used anywhere up to this point)npev_iuser1npev_iuser2 (for player entities this stores who is spectating them i believe)npev_iuser3npev_iuser4nnfor float values:npev_fuser1npev_fuser2npev_fuser3npev_fuser4nnnot sure what these are used for:npev_euser1npev_euser2npev_euser3npev_euser4nnbelieve these are for storing vector arrays or whatever (such as origin[3])npev_vuser1npev_vuser2npev_vuser3npev_vuser4nnnnow if you wanted to use the iuser entvar fields and make it so it doesnt conflict with dod_weaponjam, you could use iuser1 & iuser2 (because the weapon jam uses iuser3 and iuser4 on weapon entities)nni guess it depends how many you plan on using, and if youre not running dod_weaponjam you could still use iuser3 and 4nnnkind of hard to explain i guess, hope im not making it more confusing then it needs to be :)
Threads: 42
Joined: Sep 2007
allright unterstood - but what should I use if I what to use your dod_weaponjam too (only for 0 and 1 ) ?
Threads: 103
Joined: May 2005
like if you wanted to jam the weapon?nnhmm i would think setting doing set_pev(weaponent,pev_iuser4,1) would do itnnnnnot sure if thats what you meant

