Chris!i! Posted January 8, 2016 Share 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 Link to comment
luskanek Posted January 8, 2016 Share Posted January 8, 2016 lv = createColRectangle(901.67871, 601.66272, 2050, 2400) LV colshape Link to comment
Chris!i! Posted January 8, 2016 Author Share 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? Link to comment
luskanek Posted January 8, 2016 Share 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 ) Link to comment
Chris!i! Posted January 8, 2016 Author Share 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 .. Link to comment
Chris!i! Posted January 8, 2016 Author Share Posted January 8, 2016 i guess this inst LV colshape Link to comment
luskanek Posted January 8, 2016 Share 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 ) Link to comment
Chris!i! Posted January 8, 2016 Author Share Posted January 8, 2016 and help me with other thing that when he leavs LV he get criminal team, can you please? Link to comment
luskanek Posted January 8, 2016 Share 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 ) 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