Jump to content

تاصحيح


f5amh

Recommended Posts

اذا خش ماركر يعطيه كود حلو

وابي بعدها اذا كتب بل شات رقم

1

او

3

يعطيه فلوس

function 7ob () 
createMarker(x,y,z) 
addEventHandler(''onClientMarkerHit'',root 
outputChatBox("احفظ هذا رقم واكتب في شات رقمك ".. math.random(1,3).."",root,255,255,255,true) 
end 
  
  

مع شرح

Link to comment
اذا خش ماركر يعطيه كود حلو

وابي بعدها اذا كتب بل شات رقم

1

او

3

يعطيه فلوس

function 7ob () 
createMarker(x,y,z) 
addEventHandler(onMarkerHit'',root 
outputChatBox("احفظ هذا رقم واكتب في شات رقمك ".. math.random(1,3).."",root,255,255,255,true) 
end 
  
  

مع شرح

marker = createMarker(x, y, z, "cylinder", 1) -- صنع ماركر  
  
addEventHandler("onMarkerHit", resourceRoot, -- عند دخول الماركر 
function(player) -- وظيفة مع متغير اللي دخل الماركر 
    if source == marker then -- نتحقق ان السورس هو الماركر اللي حطينه طبعا السورس بالحدث ذا هو الماركر 
        if not getElementType(player) == "player" then return end -- اذ ماكان الي دخل الماركر لاعب يقفل الوظيفة يعني اذ دخل بيد راح يقفل الوظيفة مو شرط بيد 
        outputChatBox("احفظ هذا رقم واكتب في شات رقمك "..math.random(1,3)..,root,255,255,255,true) -- نص بالشات 
    end -- اند الشرط الاول حق التحقق من السور انه الماركر 
end -- اند الوظيفة وهو كلمة function(player) 
) -- قوس اغلاق الوظيفة 

Edited by Guest
Link to comment

م فهمت انت وش تقصد او وش تبي بالضبط لكن خذ ذا الكود ضيف الي تبيه عدل عليه انت

  
local theMark = createMarker (x,y,z,"cylinder",1.5,255,255,0,170) 
function onMarkHit(element) 
       if getElementType(element) == 'player' then 
       outputChatBox("احفظ هذا رقم واكتب في شات رقمك ".. math.random(1,3).."",root,255,255,255,true) 
       end 
end 
addEventHandler("onMarkerHit",theMark,onMarkHit) 
  
  
addEventHandler("onPlayerChat",root,function (msg,msgt) 
   if isElementWithinMarker(source,theMark) then 
       if msg == "1" then -- اذا كتب رقم 1 
        
       elseif msg == "2" then -- اذا كتب رقم 2 
        
       elseif msg == "3" then -- اذا كتب رقم 3 
        
      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...