RangeR.. Posted April 10, 2015 Posted April 10, 2015 Hi, I've tried hard to fix it but couldn't. here's the code team = createTeam ( "Crim", 255, 0, 0) pick = createPickup ( 2737.56470, -1760.36755, 44.14845, 3, 1240, 1 ) function pickupr() if getTeamName(getPlayerTeam(source)) == "Crim" then local playerTeam = getPlayerTeam ( source ) setElementHealth(source, 100) else return end end addEventHandler("onPickupHit", getRootElement(), pickupr) MTA PLAYER SINCE 2008 Staff at UGC - [uGC]Robin|GIGN Ex Staff AND MEMBER OF WGS(RACE CLAN) EX-OWNER AT POWER-GAMING EX-Leading Staff at SGC EX-FOUNDER of CIG EX-FOUNDER of Sm [stealth] EX-Staff of The Matrix My Community Scripts Private Interiors TIME PLAYED [TAB] Job Command Private Pickups
Addlibs Posted April 10, 2015 Posted April 10, 2015 Try cancelEvent(true) instead of return Previously known as MrTasty.
FlyingSpoon Posted April 10, 2015 Posted April 10, 2015 He was saying that the getPlayerTeam function output's an error, I forgot the error Quote: @Robin... - bad argument GitHub: https://github.com/flyingspoon YouTube: https://www.youtube.com/channel/UClsnd4SEid3gob33DSk1-GQ
Addlibs Posted April 10, 2015 Posted April 10, 2015 team = createTeam ( "Crim", 255, 0, 0) pick = createPickup ( 2737.56470, -1760.36755, 44.14845, 3, 1240, 1 ) function pickupr(player) if getTeamName(getPlayerTeam(player)) == "Crim" then setElementHealth(player, 100) else cancelEvent(true) return end end addEventHandler("onPickupHit", getRootElement(), pickupr) Previously known as MrTasty.
FlyingSpoon Posted April 10, 2015 Posted April 10, 2015 [2015-04-10 12:51:04] WARNING: 5: Bad argument @ 'getPlayerTeam' [Expected player at argument 1, got pickup] [2015-04-10 12:51:04] WARNING: Bad argument @ 'getTeamName' [Expected team at argument 1, got boolean] GitHub: https://github.com/flyingspoon YouTube: https://www.youtube.com/channel/UClsnd4SEid3gob33DSk1-GQ
Addlibs Posted April 10, 2015 Posted April 10, 2015 team = createTeam ( "Crim", 255, 0, 0) pick = createPickup ( 2737.56470, -1760.36755, 44.14845, 3, 1240, 1 ) function pickupr(player) if getTeamName(getPlayerTeam(player)) == "Crim" then setElementHealth(player, 100) else cancelEvent(true) return end end addEventHandler("onPickupHit", getRootElement(), pickupr) Have you tried this? Previously known as MrTasty.
FlyingSpoon Posted April 10, 2015 Posted April 10, 2015 I think he said it dont work. GitHub: https://github.com/flyingspoon YouTube: https://www.youtube.com/channel/UClsnd4SEid3gob33DSk1-GQ
Ryancit2 Posted April 10, 2015 Posted April 10, 2015 It worked, like you can see function doesn't have any typo or misc bug and also, Robin already posted this resource on community today. [Resource] Advance Voice Messaging system with 120+ languages support! [Resource] Information markers with ingame management + editable permissions! [Resource] Live weather telling app! [Resource] Send Emails from game! [HELP?] Ask Pakistani's, have fun %3C3
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