I got stuck on a problem and i really don't know why it appears. I want to create a ped serverside, set it's health to 50 and pass it to a client.
SERVER
function Ped()
local Ped = createPed (skin, x , y , z, 0, true )
setElementHealth(Ped , 50)
outputChatBox("Server Health "..getElementHealth(Ped ))
triggerClientEvent(client, "PedClient", getRootElement(), Ped )
end
CLIENT
function PedClient(Ped)
outputChatBox("Client Health "..getElementHealth(Ped))
end
addEvent("PedClient", true)
addEventHandler("PedClient", getRootElement(), PedClient)
Question
SuperBrandy
Hey there!
I got stuck on a problem and i really don't know why it appears. I want to create a ped serverside, set it's health to 50 and pass it to a client.
SERVER
CLIENT
ChatBox:
Client Health: 100
Server Health: 50
!IN THIS ORDER
Thanks for every answer!
Link to comment
2 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now