Jump to content

Recommended Posts

I want to make a character who would increase their maxhealth by +10 for each player on a server.
I can search players in radius like this:

    local x,y,z = inst.Transform:GetWorldPosition()
    local radius = 6000
    local players = TheSim:FindEntities(x, y, z, radius, {"player"}, {"playerghost"})
    local playercount = #players

But how do I apply it to maxheath change?

Or maybe I can somehow know when a player join a server, so it is possible to apply +10 when player connected and -10 when player disconnected?

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
×
  • Create New...