kevincouto6 Posted March 28, 2019 Share Posted March 28, 2019 I need help to verify, if the name is listed in the table but it is not working, thx since now ! tableNamePlayersTFO = { {theBlack}, {Alpicture}, {Delmon} }, MarkerTFO = createMarker ( 2772.85, -2514.28, 13.63 - 1, 'cylinder', 5.0, 255, 0, 0, 0 ) MarkerTwoTFO = createMarker ( 2767.72, -2518.99, 13.64 - 1, 'cylinder', 5.0, 255, 0, 0, 0 ) function SetSkinTFO(player) if getElementData(player,'vipskin') == true then else if getElementType ( player ) == "vehicle" then else if getPlayerName ( player ) == ( tableNamePlayersTFO ) then if (getPlayerSkin(player) == 290) then else setPlayerSkin(player, 290) end else local PlayerTeamTFO = getPlayerTeam ( player ) local TeamNTFO = getTeamFromName ( "The First Order" ) if isElementWithinMarker ( player, MarkerTFO ) or isElementWithinMarker ( player, MarkerTwoTFO ) then if PlayerTeamTFO == TeamNTFO then if (getPlayerSkin(player) == 288) then else setPlayerSkin(player, 288) end end end end end end end addEventHandler("onMarkerHit", MarkerTFO, SetSkinTFO) addEventHandler("onMarkerHit", MarkerTwoTFO, SetSkinTFO) Link to comment
Oussema Posted March 28, 2019 Share Posted March 28, 2019 tableNamePlayersTFO = { {"theBlack"}, {"Alpicture"}, {"Delmon"} }, MarkerTFO = createMarker ( 2772.85, -2514.28, 13.63 - 1, 'cylinder', 5.0, 255, 0, 0, 0 ) MarkerTwoTFO = createMarker ( 2767.72, -2518.99, 13.64 - 1, 'cylinder', 5.0, 255, 0, 0, 0 ) function SetSkinTFO(player) if getElementData(player,'vipskin') == true then else if getElementType ( player ) == "vehicle" then else for i, v in ipairs(tableNamePlayersTFO) do if getPlayerName ( player ) == ( v[1] ) then if (getPlayerSkin(player) == 290) then else setPlayerSkin(player, 290) end end else local PlayerTeamTFO = getPlayerTeam ( player ) local TeamNTFO = getTeamFromName ( "The First Order" ) if isElementWithinMarker ( player, MarkerTFO ) or isElementWithinMarker ( player, MarkerTwoTFO ) then if PlayerTeamTFO == TeamNTFO then if (getPlayerSkin(player) == 288) then else setPlayerSkin(player, 288) end end end end end end end addEventHandler("onMarkerHit", MarkerTFO, SetSkinTFO) addEventHandler("onMarkerHit", MarkerTwoTFO, SetSkinTFO) This will work 1 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