Jump to content

ابغى شرحح


Recommended Posts

local pick = createPickup(0,0,3,3,1550) 
  
addEventHandler("onPickupHit", pick, 
function(hitPlayer) 
    if (getTeamName(getPlayerTeam(hitPlayer)) == "M") then 
        destroyElement(pick) 
        givePlayerMoney(hitPlayer, 2000) 
    else 
        cancelEvent() 
    end 
end) 

Link to comment
local pick = createPickup(0,0,3,3,1550) 
  
addEventHandler("onPickupHit", pick, 
function(hitPlayer) 
    if (getTeamName(getPlayerTeam(hitPlayer)) == "M") then 
        destroyElement(pick) 
        givePlayerMoney(hitPlayer, 2000) 
    else 
        cancelEvent() 
    end 
end) 

ياااخي والله مجربها ولا ضبطت كبف الحين تضبط :cry:

مشكؤؤر تم

Link to comment
-- Server Side 
thePickup = createPickup ( 0, 0, 3, 3, 1550 ) 
      
addEventHandler ( "onPickupHit", root,   
    function ( hitPlayer ) --hitPlayer not thePlayer 
        if source == thePickup then 
            if getTeamName ( getPlayerTeam ( hitPlayer ) ) == "M" then ----hitPlayer not thePlayer 
                destroyElement ( thePickup ) 
                givePlayerMoney ( hitPlayer, 2000 ) ----hitPlayer not thePlayer 
            end 
        end  
    end 
) 
  

يعني سويت شيء جديد ؟؟ thePlayer ههههه انت مغير

Link to comment
local pick = createPickup(0,0,3,3,1550) 
  
addEventHandler("onPickupHit", pick, 
function(hitPlayer) 
    if (getTeamName(getPlayerTeam(hitPlayer)) == "M") then 
        destroyElement(pick) 
        givePlayerMoney(hitPlayer, 2000) 
    else 
        cancelEvent() 
    end 
end) 

ياااخي والله مجربها ولا ضبطت كبف الحين تضبط :cry:

مشكؤؤر تم

الكود صحح الله يحفظكك ^_

جربتهه

Link to comment
-- Server Side 
thePickup = createPickup ( 0, 0, 3, 3, 1550 ) 
      
addEventHandler ( "onPickupHit", root,   
    function ( hitPlayer ) --hitPlayer not thePlayer 
        if source == thePickup then 
            if getTeamName ( getPlayerTeam ( hitPlayer ) ) == "M" then ----hitPlayer not thePlayer 
                destroyElement ( thePickup ) 
                givePlayerMoney ( hitPlayer, 2000 ) ----hitPlayer not thePlayer 
            end 
        end  
    end 
) 
  

يعني سويت شيء جديد ؟؟ thePlayer ههههه انت مغير

اقرا الكلام صحح

Edited by Guest
Link to comment
local pick = createPickup(0,0,3,3,1550) 
  
addEventHandler("onPickupHit", pick, 
function(hitPlayer) 
    if (getTeamName(getPlayerTeam(hitPlayer)) == "M") then 
        destroyElement(pick) 
        givePlayerMoney(hitPlayer, 2000) 
    else 
        cancelEvent() 
    end 
end) 

ياااخي والله مجربها ولا ضبطت كبف الحين تضبط :cry:

مشكؤؤر تم

الكود صحح الله يحفظكك ^_

جربتهه

ادري انه صح وانا قلت غلط ؟ :lol:

Link to comment
-- Server Side 
thePickup = createPickup ( 0, 0, 3, 3, 1550 ) 
      
addEventHandler ( "onPickupHit", root,   
    function ( hitPlayer ) --hitPlayer not thePlayer 
        if source == thePickup then 
            if getTeamName ( getPlayerTeam ( hitPlayer ) ) == "M" then ----hitPlayer not thePlayer 
                destroyElement ( thePickup ) 
                givePlayerMoney ( hitPlayer, 2000 ) ----hitPlayer not thePlayer 
            end 
        end  
    end 
) 
  

كود عنـآآد عدل بس في اضافات لازم تكون منكك

ههههههههههههههع :)

hitPlayer not thePlayer -- ماتفرق شيء

Link to comment
-- Server Side 
thePickup = createPickup ( 0, 0, 3, 3, 1550 ) 
      
addEventHandler ( "onPickupHit", root,   
    function ( hitPlayer ) --hitPlayer not thePlayer 
        if source == thePickup then 
            if getTeamName ( getPlayerTeam ( hitPlayer ) ) == "M" then ----hitPlayer not thePlayer 
                destroyElement ( thePickup ) 
                givePlayerMoney ( hitPlayer, 2000 ) ----hitPlayer not thePlayer 
            end 
        end  
    end 
) 
  

كود عنـآآد عدل بس في اضافات لازم تكون منكك

ههههههههههههههع

hitPlayer not thePlayer -- ماتفرق شيء

-- Server Side 
thePickup = createPickup ( 0, 0, 3, 3, 1550 ) 
      
addEventHandler ( "onPickupHit", root,   
    function ( hitPlayer ) --hitPlayer not thePlayer 
        if source == thePickup then 
            if getTeamName ( getPlayerTeam ( hitPlayer ) ) == "M" then ----hitPlayer not thePlayer 
                destroyElement ( thePickup ) 
                givePlayerMoney ( hitPlayer, 2000 ) ----hitPlayer not thePlayer 
            end 
        end 
    end 
) 
  

:shock::shock: هنـآآ مـآآتفرق؟

   if getTeamName ( getPlayerTeam ( hitPlayer ) ) == "M" then 

Link to comment
math.random(3,5) 

هذي تجيب لك ارقام عشوائية ما بين ال

3

وال

5

ممكن تصير كذا

math.random(5) 

راح يعطيك ارقام عشوائية تصل إلى 5

math.random( v1, v2 ) 

v2 لازم تكون اصغر من v1

ولا مايصلح

ولها استخدامات كثيرة مهب بس في الارقام العشوائية

مع اني استخدمت رقم عشوائي في المثال لكن عطاني نص عشوائي

e.g:

aText = 
{ 
    'السلام عليكم'; 
    'كيف الحال'; 
    'بخير الحمدلله'; 
} 
  
outputChatBox( aText[ math.random( #aText ) ] ) 

وانت الحين اقتبست تعليقي على اساس انو فيه خطاء في اللي كاتبه مثلاً ؟

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