Jump to content

استفسار


Recommended Posts

الكود

function getPlayerContInMarker(theMarker) 
     i = 0 
     for _, player in ipairs(getElementsByType("player")) do 
          if isElementWithinMarker(player, theMarker) then 
               i = i + 1 
          end 
     end 
     return i 
end 

مثال على طريقة الأستخدام

marker = createMarker = (...) 
  
addCommandHandler("cont", 
function(player) 
     local cont = getPlayerContInMarker(marker) 
     outputChatBox("There are "..cont.." players in the marker", player,255,255,255,true) 
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...