erisP Posted October 26, 2020 Posted October 26, 2020 How to create immortal createPed function on server side.
Moderators Patrick Posted October 26, 2020 Moderators Posted October 26, 2020 Hi. You need to cancel the onClientPedDamage event, check the exanple code on wiki.
Moderators Patrick Posted October 26, 2020 Moderators Posted October 26, 2020 37 minutes ago, erisP said: I know but I shouldn't use client.lua. You can't do it on server side, as far as I know.
Rakashy Posted October 26, 2020 Posted October 26, 2020 use something like this in the client side addEventHandler("onClientPedDamage", getRootElement(), function() cancelEvent() end ) 1
erisP Posted October 26, 2020 Author Posted October 26, 2020 It worked, but all pads have immortal functionality.
Rakashy Posted October 26, 2020 Posted October 26, 2020 1 hour ago, erisP said: Funcionou, mas todas as almofadas têm funcionalidade imortal. you must fit the above value within your function, understand? I just gave you an example so you can get a sense of what to do ... 1
Moderators IIYAMA Posted October 27, 2020 Moderators Posted October 27, 2020 12 hours ago, erisP said: It worked, but all pads have immortal functionality. Server local pedParentElement = createElement("pedParent", "pedParent-323536") ---------------- local ped1 = createPed ( 120, 5540.6654, 1020.55122, 1240.545 ) local ped2 = createPed ( 120, 5550.6654, 1020.55122, 1240.545 ) local ped3 = createPed ( 120, 5560.6654, 1020.55122, 1240.545 ) setElementParent(ped1, pedParentElement) setElementParent(ped2, pedParentElement) setElementParent(ped3, pedParentElement) Client addEventHandler("onClientPedDamage", getElementByID("pedParent-323536"), function() cancelEvent() end ) 1
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