Jump to content

peds always die


zombienation

Recommended Posts

Posted

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)

Posted

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)

Posted

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

Posted

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

Posted

you can try something like this

addEventHandler("onClientPedDamage",root, 
function () 
     if not getElementData(source,"zombie") then 
          cancelEvent() 
     end 
end) 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...