Jump to content

setPedArmor


Predator

Recommended Posts

Hi everyone, I have made a really simple script that spawns every player with armour, but it doesn't work and I don't know what's wrong..

function setPedArmor ( player, onPlayerSpawn ) 
    setPedArmor ( player, 100 ) 
end 
addEventHandler ( "onPlayerSpawn", givePlayerArmor ) 

Anyone could help?

Link to comment
Your welcome .

LOL, Evil you not made it. What you did:

function Armor (thePlayer) 
  setPedArmor(source,100) -- why you put source here and put thePlayer argument in function? oO 
end 
addEventHandler('onPlayerSpawn',root,Armor) 

Right:

function Armor() 
  setPedArmor(source,100) 
end 
addEventHandler('onPlayerSpawn',root,Armor) 

Link to comment
function Armor ( thePlayer ) 
    setPedArmor ( source, 100 ) 
end 
addEventHandler ( "onPlayerSpawn", getRootElement(), Armor ) 

Updated !

I know u had replied with a function, but it was wrong, so i showed the parameters for u both.

you've since updated your function, even tho it will work, the parameters are still wrong. 8)

Link to comment

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...