View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001679||Multi Theft Auto : San Andreas||General||public||2006-11-19 01:24||2006-12-04 05:41|
|Target Version||Fixed in Version||mtasadm_v1.0-dp1|
|Summary||0001679: Weapon skills not assigning sometimes on playerjoin|
On my map "cir" theres a lua ran called "circleofdeathlua.lua". It assigns hitman status to each weapon on map start and playerjoin. I seem to have pinned this down to people who join the server after I start the map.
If a player was there when the map was loaded, they will attain the hitman statuses when disconnecting and reconnecting. On the other hand, if they were not there when the map was loaded, they will not attain the weapon skills I set when they join. One more note, I tested to see if weapon skill was merely carried (checking to see if it needed to be reset manually, since people there on mapload always got the skills), but port 69 reset the weapon skills.
From what I asked erorr404, this code in the additional notes should be correct. So it should be a bug. I cannot debug to make absolutely sure because the debugger gets turned off on disconnect. This should also be changed so people can debug player joining stuff.
root = getRootElement ()
addEventHandler ( "onMapLoad", root, "onMapLoad" )
addEventHandler ( "onPlayerSpawn", root, "playerSpawn" )
addEventHandler ( "onPlayerJoin", root, "onPlayerJoin" )
|Tags||No tags attached.|
Still here.. Sometimes doesn't work onMapLoad as well.
surely this is because you're assigning stats before the player has spawned, so it cant assign them? What about doing this onspawn rather than on join and on load. It's what i do and i find its more efficient.
Possibly, but either way it should work.
Logically, it shouldn't work, the player hasn't even been created until he spawns after joining, but i've fixed it anyway.