ahmed366 Posted June 29, 2017 Share Posted June 29, 2017 وش المشكلة ف ذا الكود ؟؟ local myMarker = createMarker(2494.86475, -1676.68213, 13.33777, 'cylinder', 2.0, 255, 0, 0, 150) function out ( source ) local theplayer = getPlayerTeam ( source ) if theplayer == "elsh" then outputChatBox(" you in team ") else outputChatBox("you no team") end end addEventHandler("onPlayerMarkerHit", getRootElement(), out) Link to comment
iMr.Omar Posted June 29, 2017 Share Posted June 29, 2017 myMarker = createMarker(2494.86475, -1676.68213, 13.33777, 'cylinder', 2.0, 255, 0, 0, 150) addEventHandler ( "onMarkerHit" , resourceRoot , function ( hitElement ) if ( source == myMarker and getElementType ( hitElement ) == "player" ) then local PlayerTeam = getPlayerTeam ( hitElement ) if ( PlayerTeam ) then local Message = ( getTeamName ( PlayerTeam ) == "elsh" and "you are in team" or "you don't have team" ) outputChatBox(Message,hitElement,0,255,0,true) 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