Jump to content

onPlayerWeaponSwitch doesn't trigger.


Tuna

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...