Jump to content

setPedArmor


Predator

Recommended Posts

Posted

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?

Posted (edited)
function Armor ( thePlayer ) 
    setPedArmor ( source, 100 ) 
end 
addEventHandler ( "onPlayerSpawn", getRootElement(), Armor ) 

Updated !

Edited by Guest

My in-game nick is |['Dev-PoinT_SA']|

addEventHandler ( "onPlayerSpawn", getRootElement(),

function()

if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then

triggerClientEvent("BlaBlaBla",getRootElement())

DxDrawText("Hi Dev-PoinT")

end

end)

Posted
function Armor () -- params: posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension  
    setPedArmor ( source, 100 ) 
end 
addEventHandler ( "onPlayerSpawn", Armor ) 

ScoobySig.gif

[UVA]Scooby

Founder Of UVA - Ultimate Vice Assassins

http://www.uvaclan.com/

Posted
function Armor () -- params: posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension  
    setPedArmor ( source, 100 ) 
end 
addEventHandler ( "onPlayerSpawn", Armor ) 

lol i alredy made it :)

My in-game nick is |['Dev-PoinT_SA']|

addEventHandler ( "onPlayerSpawn", getRootElement(),

function()

if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then

triggerClientEvent("BlaBlaBla",getRootElement())

DxDrawText("Hi Dev-PoinT")

end

end)

Posted

Your welcome .

My in-game nick is |['Dev-PoinT_SA']|

addEventHandler ( "onPlayerSpawn", getRootElement(),

function()

if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then

triggerClientEvent("BlaBlaBla",getRootElement())

DxDrawText("Hi Dev-PoinT")

end

end)

Posted
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) 

EPT Team Server Development: 0%

Learning C++ | C++ is amazing xD

Posted
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)

ScoobySig.gif

[UVA]Scooby

Founder Of UVA - Ultimate Vice Assassins

http://www.uvaclan.com/

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