Vic_RattleHead Posted January 17, 2015 Share Posted January 17, 2015 (edited) GRACIAS. Edited January 19, 2015 by Guest Link to comment
MTA Team botder Posted January 17, 2015 MTA Team Share Posted January 17, 2015 function createteam () Police = createTeam ( "Police", 0, 0, 255 ) end addEventHandler("onResourceStart", getRootElement(), createteam) Replace getRootElement() with resourceRoot immediately. Link to comment
Vic_RattleHead Posted January 17, 2015 Author Share Posted January 17, 2015 (edited) Thanks. Edited January 19, 2015 by Guest Link to comment
Et-win Posted January 17, 2015 Share Posted January 17, 2015 He said resourceRoot not resourceRoot() . Also use and learn to use debugscript 3 Link to comment
Vic_RattleHead Posted January 19, 2015 Author Share Posted January 19, 2015 (edited) close Edited January 20, 2015 by Guest Link to comment
DNL291 Posted January 19, 2015 Share Posted January 19, 2015 setTeamFriendlyFire( getTeamFromName(teamName), false ) Link to comment
Vic_RattleHead Posted January 19, 2015 Author Share Posted January 19, 2015 (edited) close Edited January 20, 2015 by Guest Link to comment
DNL291 Posted January 19, 2015 Share Posted January 19, 2015 That's because your code has some errors. It's missing an end to close the if statement and also to close the function spawnPolice. I suppose the code: triggerClientEvent ( "onPlayerChooseTeam", getRootElement(), teamName ) end end Is a part from the function spawnPolice. Link to comment
Vic_RattleHead Posted January 19, 2015 Author Share Posted January 19, 2015 (edited) close Edited January 20, 2015 by Guest Link to comment
DNL291 Posted January 19, 2015 Share Posted January 19, 2015 function spawnPolice ( cityName, teamName, skinName ) if ( teamName == "Police" and skinName == "Police" ) then setPlayerTeam ( source, teamPolice ) setTeamFriendlyFire( getTeamFromName(teamPolice), false ) local x,y,z x = 1608.10 y = -1686.58 z = 6.21 spawnPlayer ( source, x,y,z ) fadeCamera(source, true) giveWeapon ( source, 3, 2000 ) giveWeapon ( source, 22, 2000 ) giveWeapon ( source, 32, 2000 ) giveWeapon ( source, 25, 200 ) setElementHealth ( source, 100 ) setElementModel ( source,280 ) setPedArmor ( source, 0 ) triggerClientEvent ( "onPlayerChooseTeam", getRootElement(), teamName ) end end addEvent("setPlayerTeam",true) addEventHandler("setPlayerTeam",resourceRoot,function(Police) setPlayerTeam(client,Police) end ) Try it. Link to comment
Et-win Posted January 19, 2015 Share Posted January 19, 2015 You are totally not even trying to solve your errors. Link to comment
Vic_RattleHead Posted January 19, 2015 Author Share Posted January 19, 2015 Thanks the spawn is 95% completed. Link to comment
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