Miika Posted October 16, 2014 Share Posted October 16, 2014 (edited) Police not working, it not se player team. function setPolice(policePlayer) police = getPlayerName(policePlayer) setPlayerSkin(policePlayer, 280) giveWeapon(policePlayer, 3) setPedWeaponSlot (policePlayer, 1) setElementPosition (policePlayer, -1626, 675, 7.1875) setPlayerTeam(policePlayer, PoliceTeam) outputChatBox("" .. police .. " on nyt Poliisi!", getRootElement(), 255, 255, 0) end addCommandHandler("police", setPolice) StaffTeam = createTeam ("Staff", 105,0,91 ) ArmyTeam = createTeam ("Army", 12,105,0 ) FBITeam = createTeam ("FBI", 91,0,209 ) SwatTeam = createTeam ("SWAT", 15,0,112 ) PoliceTeam = createTeam ("Police", 29,0,217 ) CrimnalTeam = createTeam ("Criminal", 255,0,0 ) EmergencyTeam = createTeam ("Emergency", 0,242,255 ) CivilliansTeam = createTeam ("Civilians", 255,255,0 ) FreeroamTeam = createTeam ("Freeroam", 17,112,0 ) UnemployedTeam = createTeam ("Unemployed", 209,209,209 ) Edited October 17, 2014 by Guest Link to comment
DNL291 Posted October 16, 2014 Share Posted October 16, 2014 Try this: function setPolice(policePlayer) local policeTeam = getTeamFromName("Police") local police = getPlayerName(policePlayer) setElementModel(policePlayer, 280) giveWeapon(policePlayer, 3) setPedWeaponSlot (policePlayer, 1) setElementPosition (policePlayer, -1626, 675, 7.1875) setPlayerTeam(policePlayer, policeTeam) outputChatBox("" .. police .. " on nyt Poliisi!", getRootElement(), 255, 255, 0) end addCommandHandler("police", setPolice) Link to comment
Miika Posted October 17, 2014 Author Share Posted October 17, 2014 Try this: function setPolice(policePlayer) local policeTeam = getTeamFromName("Police") local police = getPlayerName(policePlayer) setElementModel(policePlayer, 280) giveWeapon(policePlayer, 3) setPedWeaponSlot (policePlayer, 1) setElementPosition (policePlayer, -1626, 675, 7.1875) setPlayerTeam(policePlayer, policeTeam) outputChatBox("" .. police .. " on nyt Poliisi!", getRootElement(), 255, 255, 0) end addCommandHandler("police", setPolice) thx 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