Jump to content

طلب كود القتال في تيمم


Recommended Posts

صح ككذا ؟

 mohamad = createColRectangle ( -2171.0678710938, 678.17950439453, 15, 15 ) 
    
    addEventHandler ( "onColShapeHit", root, 
    addEventHandler ( "onPlayerWasted", root, 
        function ( _, killer ) 
        setTeamFriendlyFire ( team1, true ) 
        setTeamFriendlyFire ( team2, true ) 
        if(isElementWithinColShape ( source, mohamad ))then 
            if killer and getElementType ( killer ) == "player" and killer~=source then 
            if (getTeamName(getPlayerTeam(hitPlayer))=="team1") or (getTeamName(getPlayerTeam(hitPlayer))=="team2")then 
                givePlayerMoney ( killer, 4000 )   
                outputChatBox("#7FFF00 you’re win 4000$ ", source, 255, 255, 255, true ) 
                    end 
                end 
            end 
        end 
    ) 
    ) 
  

اذا فيه اخطاء صححوها لاهنتم :P

Link to comment
mohamad = createColRectangle(-2171.0678710938, 678.17950439453, 15, 15) 
team1 = createTeam("team1", 255, 255, 255) 
team2 = createTeam("team2", 255, 255, 255) 
setTeamFriendlyFire(team1, false) 
setTeamFriendlyFire(team2, false) 
    
addEventHandler("onPlayerWasted", root, 
function(_, killer) 
    if isElementWithinColShape(source, mohamad) then 
        if killer and getElementType(killer) == "player" and killer ~= source then 
            if (getPlayerTeam(killer) == team1) or (getPlayerTeam(killer) == team2) then 
                givePlayerMoney(killer, 4000)   
                outputChatBox("#7FFF00 you’re win 4000$ ", killer, 255, 255, 255, true) 
            end 
        end 
    end 
end) 

Link to comment
mohamad = createColRectangle(-2171.0678710938, 678.17950439453, 15, 15) 
team1 = createTeam("team1", 255, 255, 255) 
team2 = createTeam("team2", 255, 255, 255) 
setTeamFriendlyFire(team1, false) 
setTeamFriendlyFire(team2, false) 
    
addEventHandler("onPlayerWasted", root, 
function(_, killer) 
    if isElementWithinColShape(source, mohamad) then 
        if killer and getElementType(killer) == "player" and killer ~= source then 
            if (getPlayerTeam(killer) == team1) or (getPlayerTeam(killer) == team2) then 
                givePlayerMoney(killer, 4000)   
                outputChatBox("#7FFF00 you’re win 4000$ ", killer, 255, 255, 255, true) 
            end 
        end 
    end 
end) 

يسلمؤؤ

شباب وش الخطأ ؟

addEventHandler ( "onPlayerJoin", root, 
function ( player ) 
player = getElementType(player) == ( "player" ) 
ss = setCameraMatrix(source, 0, 0, 20, 180) 
setTimer ( function() 
         setCameraTarget ( player ) 
         spawnPlayer(player, 0, 0, 3) 
    end, 2000, 1 ) 
end 
) 

Link to comment

شباب وش الخطأ ؟

addEventHandler ( "onPlayerJoin", root, 
function ( player ) 
player = getElementType(player) == ( "player" ) 
ss = setCameraMatrix(source, 0, 0, 20, 180) 
setTimer ( function() 
         setCameraTarget ( player ) 
         spawnPlayer(player, 0, 0, 3) 
    end, 2000, 1 ) 
end 
) 

جرب

addEventHandler( 'onPlayerJoin', getRootElement( ), 
    function( ) 
    setCameraMatrix( source, 0, 0, 20, 180 ) 
        setTimer( function( ) 
            setCameraTarget( source ) 
            spawnPlayer( source, 0, 0, 3 ) 
        end, 2000, 1 ) 
    end 
) 

Link to comment

شباب وش الخطأ ؟

addEventHandler ( "onPlayerJoin", root, 
function ( player ) 
player = getElementType(player) == ( "player" ) 
ss = setCameraMatrix(source, 0, 0, 20, 180) 
setTimer ( function() 
         setCameraTarget ( player ) 
         spawnPlayer(player, 0, 0, 3) 
    end, 2000, 1 ) 
end 
) 

جرب

addEventHandler( 'onPlayerJoin', getRootElement( ), 
    function( ) 
    setCameraMatrix( source, 0, 0, 20, 180 ) 
        setTimer( function( ) 
            setCameraTarget( source ) 
            spawnPlayer( source, 0, 0, 3 ) 
        end, 2000, 1 ) 
    end 
) 

ما ضبط :cry:

Link to comment
addEventHandler( 'onPlayerJoin', getRootElement( ), 
    function( ) 
        setCameraMatrix( source, 0, 0, 20, 180 ) 
        setTimer( setCameraTarget, 2000, 1, source ) 
        setTimer( spawnPlayer, 2000, 1, source, 0, 0, 3 ) 
    end 
) 

جرب

ضبطط :D

بس وش الفرق انت بس غيرت طريقة استخخدام التايمير ؟^

Link to comment
addEventHandler( 'onPlayerJoin', getRootElement( ), 
    function( ) 
        setCameraMatrix( source, 0, 0, 20, 180 ) 
        setTimer( setCameraTarget, 2000, 1, source ) 
        setTimer( spawnPlayer, 2000, 1, source, 0, 0, 3 ) 
    end 
) 

جرب

ضبطط :D

بس وش الفرق انت بس غيرت طريقة استخخدام التايمير ؟^

الكود الاول لم يتم التعرف على source

Link to comment
addEventHandler( 'onPlayerJoin', getRootElement( ), 
    function( ) 
        setCameraMatrix( source, 0, 0, 20, 180 ) 
        setTimer( setCameraTarget, 2000, 1, source ) 
        setTimer( spawnPlayer, 2000, 1, source, 0, 0, 3 ) 
    end 
) 

جرب

ضبطط :D

بس وش الفرق انت بس غيرت طريقة استخخدام التايمير ؟^

الكود الاول لم يتم التعرف على source

يعطيكك الف عافيةة

اقدر اغير زاوية الكاميرا؟

Link to comment
setCameraMatrix( source, 0, 0, 20, 180 ) 

اذ تقصصد الـ 180

جربت اغيرها اككثر من مرة !

Wiki :

roll: The camera roll angle, -180 to 180. A value of 0 means the camera sits straight, positive values will turn it counter-clockwise and negative values will turn it clockwise. -180 or 180 means the camera is upside down.

Link to comment

ي ريت ي بي كول تقرآ الويكي زين

setCameraMatrix ( thePlayer, positionX, positionY, positionZ , lookAtX, lookAtY, lookAtZ ) 

setCameraMatrix( source, positionX, positionY, positionZ , lookAtX, lookAtY, lookAtZ ) 
positionX, positionY, positionZ = مكآن الكآم وين يكون 
lookAtX, lookAtY, lookAtZ = مكآن وين يطآلع فيه  

Link to comment
ي ريت ي بي كول تقرآ الويكي زين
setCameraMatrix ( thePlayer, positionX, positionY, positionZ , lookAtX, lookAtY, lookAtZ ) 

setCameraMatrix( source, positionX, positionY, positionZ , lookAtX, lookAtY, lookAtZ ) 
positionX, positionY, positionZ = مكآن الكآم وين يكون 
lookAtX, lookAtY, lookAtZ = مكآن وين يطآلع فيه  

تعجبني آنك تحب تفهم الشخص الكود بالتفصيل , صدقت هو بي كول ^^ :wink:

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