Jump to content

dumb question


triplesnake

Recommended Posts

Posted

so i know this is a dumb question but i cant remember at all well i wanna do something setting a player team or setting anything to him when he enter so i have to get him from name so my question is if iwant it to get the player by command handler

getPlayerFromName[b]("the player")[/b] 

so is it the player or player or what?

sorry on the weird explaining but i dunno how to explain better

Posted

firstly ty i was trying to do something like this

setVehicleDamageProof(getPedOccupiedVehicle(getPlayerFromName(theplayer)),true) 

but not sure about the player part "theplayer" part is it right?

Posted
function damage(player) 
    setVehicleDamageProof(getPedOccupiedVehicle(getPlayerFromName(player)),true) -- theplayer is wrong! it has to be player, like in the brackets of the function 
end 
addCommandHandler("proofme",damage) 

Use this

Posted

hmm 1 last remark the script isnt working do u have any idea why? might it be too much functions put together? bec it says bad argument on

getPlayerFromName and the other 2

Posted

Because player is an element, and not a name :D

Sorry my mistake.

function damage(player) 
    setVehicleDamageProof(getPedOccupiedVehicle(player),true) 
end 
addCommandHandler("proofme",damage) 

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