Jump to content

مشكلة في كود


Recommended Posts

وش المشكلة ف ذا الكود ؟؟

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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...