Jump to content

How I can make "local" event in Serverside?


mcer

Recommended Posts

Posted

I mean how to make a function and an event "Triggered" on serverside only appears for one user and not for everyone. (Can't be clientside).

Posted

Just execute it for that player only?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Moderators
Posted

It depends what you want to make. Be more specific.

You mean something like this?

addEvent("myEvent",true) 
addEventHandler("myEvent",root, 
function (x,y,z) 
if isElement(source) then -- make sure the player does still exist before the data reached the server. 
setElementPosition (source,x,y,z) 
end 
end) 

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

I want to use the "Setpedanimation" in server side, but for a specific user only (The user who has less than 20 blood).

Posted

Loop all players, check their health, if is lower than 20%, set the animation.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • 2 weeks later...
Posted
Loop all players, check their health, if is lower than 20%, set the animation.

Oh, sorry i never reply this... Thanks! :D

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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