~DarkRacer~ Posted March 18, 2013 Share Posted March 18, 2013 How can i get the player who hit a marker?? Code: (see line 8 ) -- Server Side! local marker1 = createMarker(-2421, -608, 131, "cylinder", 2, 255, 0, 0, 255) local accountname = nil addEventHandler("onMarkerHit", marker1, function() accountname = getAccountName (getPlayerAccount( thePlayerWhoHitMarker1 )) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "admin" ) ) then outputChatBox("Admin!") end end ) Link to comment
iPrestege Posted March 18, 2013 Share Posted March 18, 2013 You want to get Account name or show on the chat only "Admin" ? Choose one : local marker1 = createMarker(-2421, -608, 131, "cylinder", 2, 255, 0, 0, 255) addEventHandler("onMarkerHit", marker1, function(player) if (getElementType(player) == "player") then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("admin")) then outputChatBox("You're Account Name is : "..getAccountName(getPlayerAccount(player)).." ") end end end ) or : local marker1 = createMarker(-2421, -608, 131, "cylinder", 2, 255, 0, 0, 255) addEventHandler("onMarkerHit", marker1, function(player) if (getElementType(player) == "player") then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("admin")) then outputChatBox("Admin") end end end ) Server Side !! 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