Jump to content

math calculation inside "triggerServerEvent


IIYAMA

Recommended Posts

  • Moderators

Hello,

Question: will math.floor be calculated at server or client side? I don't know, because it is maybe possible that the math will be send with the trigger. I use math.floor to reduce high bandwidth.

triggerServerEvent("S_SHOOT",getLocalPlayer(),weapon,aHits,math.floor(sX), math.floor(sY), math.floor(z),getTickCount()/1000*45); 

Link to comment

On the client, because think of it this way: if you'd pass the instructions to some player element, the server still wouldn't know what is meant. It needs the absolute object reference which is returned by the instructions. Therefore, the client always evals the instructions before sending them to the server.

Edited by Guest
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...