Chris!i! Posted January 8, 2016 Posted January 8, 2016 local Gangsters = createTeam ( "Gangsters", 90, 11, 207 ) if (zone == "Las Venturas") then setPlayerTeam ( source, Gangsters ) end If the player just logins in LV or enter LV while he was outside of it, i want his team to turn into this team called Gangsters i tried 3 other methods still didnt work it only creates the team on the scoreboard i could make it 100% if u guys give me LV col shape x y z
luskanek Posted January 8, 2016 Posted January 8, 2016 lv = createColRectangle(901.67871, 601.66272, 2050, 2400) LV colshape
Chris!i! Posted January 8, 2016 Author Posted January 8, 2016 901.67871, 601.66272, 2050 = LVarea local lv = createColRectangle(901.67871, 601.66272, 2050, 2400) local theTeam = createTeam ( Gangsters ) function LV (thePlayer) outputChatBox("test, thePlayer, 255, 255, true) setPlayerTeam ( source, theTeam ) end addEventHandler("onColShapeHit", LVcolshape, LV) is this good and works perfectly?
luskanek Posted January 8, 2016 Posted January 8, 2016 lv = createColRectangle(901.67871, 601.66272, 2050, 2400) theTeam = createTeam("Gangsters") addEventHandler("onColShapeHit", getRootElement(), function() if getElementType(hitElement) == 'player' then if source == lv then outputChatBox("test") setPlayerTeam(hitElement, theTeam) end end end )
Chris!i! Posted January 8, 2016 Author Posted January 8, 2016 Still didnt work, the teams been shown in Scoreboard but players doesnt switch to the gangsters team, i tried to re enter LV still no ..
luskanek Posted January 8, 2016 Posted January 8, 2016 Whoops, my bad, sorry! Try this: lv = createColRectangle(901.67871, 601.66272, 2050, 2400) theTeam = createTeam("Gangsters") addEventHandler("onColShapeHit", getRootElement(), function(hitElement) -- forgot hitElement if getElementType(hitElement) == 'player' then if source == lv then outputChatBox("test") setPlayerTeam(hitElement, theTeam) end end end )
Chris!i! Posted January 8, 2016 Author Posted January 8, 2016 and help me with other thing that when he leavs LV he get criminal team, can you please?
luskanek Posted January 8, 2016 Posted January 8, 2016 lv = createColRectangle(901.67871, 601.66272, 2050, 2400) theTeam = createTeam("Criminal") addEventHandler("onColShapeLeave", getRootElement(), function(hitElement) if getElementType(hitElement) == 'player' then if source == lv then setPlayerTeam(hitElement, anotherTeam) end end end )
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