Jump to content

client side function


Recommended Posts

hi, i'm a little confused about some function in client side, i can understand that function for making gui is client side, but why a function like setElementHealth or setElementModel is client side, and if for exemple i change the localPlayer model(skin) its seen to the player only or to all other players??

the second biggest problem for these client side function is security, there is a setPlayerMoney in client side, so the client can easly change the amount of money to give to himself

Link to comment

Some client-side functions sync with server, because they set values that are always synced with the server after intervals; like position, rotation and velocity.

Changing localPlayer skin wont change how you look for others.

Changing a players money client-side wont change it server-side as noted on wiki for the function:

Note: Using this function client side (not recommended) will not change a players money server side.

If you check for a players money server-side (like you should with most things where security is an issue), you wont have to worry.

Link to comment
  • Moderators

setElementHealth or setElementModel < Works only at client elements which are NOT streamed.

Streamed elements have synchronisations(serverside created: players, peds, vehicles).

SetPlayerMoney doesn't gets streamed from client > server, (only server > client). so don't worry about that.

@ arezu was first :shock:

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...