triplesnake Posted January 27, 2012 Posted January 27, 2012 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 http://www.blueptp.com/credit.php?pseudo=wedo331
BriGhtx3 Posted January 27, 2012 Posted January 27, 2012 function anc(player,cmd,target) if target then pTarget = getPlayerFromName(target) setElementData(pTarget,"abc",true) end end Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
triplesnake Posted January 27, 2012 Author Posted January 27, 2012 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? http://www.blueptp.com/credit.php?pseudo=wedo331
BriGhtx3 Posted January 27, 2012 Posted January 27, 2012 show the whole function Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
triplesnake Posted January 27, 2012 Author Posted January 27, 2012 function damage(player) setVehicleDamageProof(getPedOccupiedVehicle(getPlayerFromName(the player)),true) end addCommandHandler("proofme",damage) http://www.blueptp.com/credit.php?pseudo=wedo331
BriGhtx3 Posted January 27, 2012 Posted January 27, 2012 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 Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
triplesnake Posted January 27, 2012 Author Posted January 27, 2012 oh man thank you a lot i just couldn't remember at all dumb me :P thanks a lot on your help and time http://www.blueptp.com/credit.php?pseudo=wedo331
triplesnake Posted January 27, 2012 Author Posted January 27, 2012 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 http://www.blueptp.com/credit.php?pseudo=wedo331
BriGhtx3 Posted January 27, 2012 Posted January 27, 2012 Because player is an element, and not a name Sorry my mistake. function damage(player) setVehicleDamageProof(getPedOccupiedVehicle(player),true) end addCommandHandler("proofme",damage) Currently working on gamemodes : Reallife Script 70% Breakout Script 10%
triplesnake Posted January 27, 2012 Author Posted January 27, 2012 oh thank you a lot its working fine now i am making a derby mod in freeroam and this is part of it such a surprise with my noobnes isnt it? http://www.blueptp.com/credit.php?pseudo=wedo331
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