Vic_RattleHead Posted January 17, 2015 Posted January 17, 2015 (edited) GRACIAS. Edited January 19, 2015 by Guest
MTA Team botder Posted January 17, 2015 MTA Team Posted January 17, 2015 function createteam () Police = createTeam ( "Police", 0, 0, 255 ) end addEventHandler("onResourceStart", getRootElement(), createteam) Replace getRootElement() with resourceRoot immediately.
Vic_RattleHead Posted January 17, 2015 Author Posted January 17, 2015 (edited) Thanks. Edited January 19, 2015 by Guest
Et-win Posted January 17, 2015 Posted January 17, 2015 He said resourceRoot not resourceRoot() . Also use and learn to use debugscript 3
Vic_RattleHead Posted January 19, 2015 Author Posted January 19, 2015 (edited) close Edited January 20, 2015 by Guest
DNL291 Posted January 19, 2015 Posted January 19, 2015 setTeamFriendlyFire( getTeamFromName(teamName), false )
Vic_RattleHead Posted January 19, 2015 Author Posted January 19, 2015 (edited) close Edited January 20, 2015 by Guest
DNL291 Posted January 19, 2015 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.
Vic_RattleHead Posted January 19, 2015 Author Posted January 19, 2015 (edited) close Edited January 20, 2015 by Guest
DNL291 Posted January 19, 2015 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.
Et-win Posted January 19, 2015 Posted January 19, 2015 You are totally not even trying to solve your errors.
Vic_RattleHead Posted January 19, 2015 Author Posted January 19, 2015 Thanks the spawn is 95% completed.
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