erisP Posted October 26, 2020 Share Posted October 26, 2020 How to create immortal createPed function on server side. Link to comment
Moderators Patrick Posted October 26, 2020 Moderators Share Posted October 26, 2020 Hi. You need to cancel the onClientPedDamage event, check the exanple code on wiki. Link to comment
erisP Posted October 26, 2020 Author Share Posted October 26, 2020 I know but I shouldn't use client.lua. Link to comment
Moderators Patrick Posted October 26, 2020 Moderators Share 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. Link to comment
Rakashy Posted October 26, 2020 Share Posted October 26, 2020 use something like this in the client side addEventHandler("onClientPedDamage", getRootElement(), function() cancelEvent() end ) 1 Link to comment
erisP Posted October 26, 2020 Author Share Posted October 26, 2020 It worked, but all pads have immortal functionality. Link to comment
Rakashy Posted October 26, 2020 Share 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 Link to comment
Moderators IIYAMA Posted October 27, 2020 Moderators Share 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 Link to comment
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