zombienation Posted February 24, 2012 Posted February 24, 2012 hello, i have this thing that my players always kills the peds on the server, peds with skinpickup, to show what skin is wich pickup.. is it possible to make peds stay standing even when they get shot? thx here is a line of how i add the peds mechanic1 = createPed(50,-2614, 1354, 7, 0) setElementHealth(mechanic1, 100)
Castillo Posted February 24, 2012 Posted February 24, 2012 addEventHandler("onClientPedDamage",root, function () cancelEvent() end ) That'll cancel damage done to peds.
zombienation Posted February 24, 2012 Author Posted February 24, 2012 thanks, but i tried it but didn't worked, maybe i better showed the full mechanic lines and not just only the ped.. sorry for that mechanic1 = createPed(50,-2614, 1354, 7, 0) setElementHealth(mechanic1, 100) mechanicpickup = createPickup (-2614, 1354, 7, 3, 1275, 15000 ) function mechanicskinpickup ( thePlayer ) setPedSkin ( thePlayer, 50 ) setPlayerTeam ( thePlayer, teammechanic ) setElementData ( thePlayer, "zombie", false ) createVehicle(525,-2607,1355,10) end addEventHandler ( "onPickupUse", mechanicpickup, mechanicskinpickup ) addEventHandler ("onPickupUse", getRootElement(), function (playerWhoUses) if (source == mechanicpickup) then setPlayerNametagText (playerWhoUses, "" .. getPlayerName (playerWhoUses)) setElementData (playerWhoUses, "job", "farm") outputChatBox ( "* " .. getPlayerName(playerWhoUses) .. " joined mechanic team, go in a car and press /repair to repair it", getRootElement(), 255, 255, 0,false) end end)
Castillo Posted February 24, 2012 Posted February 24, 2012 You set the anti-damage script as a client side script, right?
zombienation Posted February 24, 2012 Author Posted February 24, 2012 aaaah no, i tought i had to add it in the team/ped lines i just showed. i'll make a client lua now, thanks
drk Posted February 24, 2012 Posted February 24, 2012 And please, next time tabulate your code and use [lua] tags.
zombienation Posted February 25, 2012 Author Posted February 25, 2012 Is it also possible to make the peds stay on there location? For example, when players hit a ped with a car or explosion, The ped moves away from his spawnlocation. Is it possible to make them "solid" on their location? Thx
zombienation Posted February 25, 2012 Author Posted February 25, 2012 Thanks, I'll add it after work, Last night i have also noticed that this anti damage script bugs the zombies. When i have it on, zombies can only die with headshot. Is it possible to get this right pls? Thx
TAPL Posted February 25, 2012 Posted February 25, 2012 you can try something like this addEventHandler("onClientPedDamage",root, function () if not getElementData(source,"zombie") then cancelEvent() end end)
Slothman Posted February 25, 2012 Posted February 25, 2012 Great, way to accidentally create a race of superzombies. hope your happy about dooming us all.
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