Tuna Posted September 3, 2010 Share Posted September 3, 2010 After debugging a simple script to find out the event didn't even work I have found that onPlayerWeaponSwitch does not work. It is only triggering when a player is given a weapon. Since there is no bug tracker I'll post here. function onSwitch(prev, new) outputChatBox(tostring(prev).." "..tostring(new).." "..getPlayerName(source), root, 255, 255, 0) end addEventHandler("onPlayerWeaponSwitch", root, onSwitch) Nobody on the server was triggering it, only when weapons were being given to people. Server Version: 1.0.4-release-1963 Link to comment
Spider Pork Posted September 4, 2010 Share Posted September 4, 2010 Use onClientPlayerWeaponSwitch... It's a client-side event and it's more efficient. Link to comment
Tuna Posted September 4, 2010 Author Share Posted September 4, 2010 Thats not the point, if an event does not work it should be removed or fixed. Edit: and yet another function that is failing server side: isElementInWater. Ran a for loop isElementInWater (vehicles) got no returns, run it client side and got 2. There were players stood around the vehicle in the water so it can't have been that somebody had to stream it for the server side one to work. Link to comment
dzek (varez) Posted September 4, 2010 Share Posted September 4, 2010 hmm, lets wait to bugtracker comes back online.. and treat Spider Pork's reply as workaround not solution Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now