esporta05 Posted July 25, 2014 Share Posted July 25, 2014 So I understand that as a beginner scripter I was pushing my self so hard to make detailed and improved scripts and that was the reason why I get stuck all the time so I decided to make a simple hospital script . Getin mark get the health, simple logic. I created a medic for the marker and named it as adriana lima <3 . The problem is I dont want adriana to die or escape from me. I want her to be with me till my server stays online . So in short explanation, how can make a ped immortal and freeze it AdrianaLima = createPed ( 276, 1181.7275390625, -1332.9736328125, 14.581448554993, -90, false ) Link to comment
esporta05 Posted July 25, 2014 Author Share Posted July 25, 2014 Okay I managed freezing my darling but I still need her to be immortal I forgot to tell that my script is server sided Link to comment
LonelyRoad Posted July 25, 2014 Share Posted July 25, 2014 The example of this is on the createPed page itself. You will need to use the following code - CLIENT SIDE: function cancelPedDamage() cancelEvent() -- Cancels the onClientPedDamage event end addEventHandler("onClientPedDamage", AdrianaLima, cancelPedDamage) Link to comment
esporta05 Posted July 25, 2014 Author Share Posted July 25, 2014 okay thanks it worked. I dont want to open another topic so, how can i hide a DXrectangle and text? Is there anything similiar to guisetvisible function? Link to comment
TAPL Posted July 25, 2014 Share Posted July 25, 2014 okay thanks it worked. I dont want to open another topic so, how can i hide a DXrectangle and text? Is there anything similiar to guisetvisible function? You need to remove the event onClientRender. removeEventHandler Link to comment
esporta05 Posted July 25, 2014 Author Share Posted July 25, 2014 I managed it with setting alpha Link to comment
LonelyRoad Posted July 28, 2014 Share Posted July 28, 2014 Setting alpha I think is a bad way to do it, because the client still has to 'think about' the dx drawings being there, then superimpose the alpha. It's better to just remove the event handler, as TAPL said. 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