Jump to content

تصحيح كود


Recommended Posts

سلام عليكم

ابي فنكشنات انه لما اشر المواس او احركه باتجاه زر يطلع صوت

وابيه لما يضغظ زر يطلع صوت زي المسج اذا فهمتو :)

Edited by Guest
Link to comment

وعليكم السلام ورحمة الله وبركاتة

تفضل طبعاً مثال هذا فقط لآ غير

function ReturnSound (      ) 
        if eventName == 'onClientMouseEnter' then  
                          -- اذا كان الحدث عند مرور الماوس 
            playSoundFrontEnd ( 20 )  
            -- يتم تشغيل الصوت عند مرور الماوس .. 
        else 
                        -- اذا كان الحدث خلاف حدث مرور الماوس 
            playSoundFrontEnd ( 15 ) 
            -- يتم تشغيل الصوت عند ضغط الزر 
        end 
    end 
addEventHandler ( 'onClientMouseEnter',guiElement,ReturnSound ) 
addEventHandler ( 'onClientGUIClick',guiElement,ReturnSound ) 

guiElement = الزر .. أو الألمنت ..

Link to comment

تصحيح ما دام الموضوع لسى مفتوح وما فيا حيل افتح موضوع جديد ض

addEventHandler ( "onPlayerWasted", getRootElement( ), 
    function ( )     
            if ( team ) and ( getTeamName ( team ) == "Civilians" ) and ( getElementData ( client, "Occupation" )) ~= "Bus Driver" then 
            setElementPosition ( localPlayer, -2258, 541, 35 ) 
        end 
    end 
) 

ابيه اذا كان في تيم Clivilians و

Occupation ( Bus Driver )

ولما يموت يرسبن في المكان :)

Link to comment

-- Server Side # 
addEventHandler ( 'onPlayerWasted', root,function ( ) 
    if ( getPlayerTeam( source ) ) and ( getTeamName ( getPlayerTeam( source ) ) == 'Civilians' ) and ( getElementData ( source, 'Occupation' )) ~= 'Bus Driver' then 
            spawnPlayer ( source, -2258, 541, 35 ) 
        end 
    end 
) 
Link to comment
-- Server Side # 
addEventHandler ( 'onPlayerWasted', root,function ( ) 
    if ( getPlayerTeam( source ) ) and ( getTeamName ( getPlayerTeam( source ) ) == 'Civilians' ) and ( getElementData ( source, 'Occupation' )) ~= 'Bus Driver' then 
            spawnPlayer ( source, -2258, 541, 35 ) 
        end 
    end 
) 
  

مآفيهه شي الكودد : )

تآكد انكك في تيم Civilians

Link to comment

تأكد انك في تيم , وان عندك داتا ذذ

ممكن انت مسوي كود او شيء يعطل الوظيفه سوي تايمر ذذ,

-- Server Side # 
local Timer = {} 
  
addEventHandler ( 'onPlayerWasted', root,function ( ) 
    if ( getPlayerTeam( source ) ) and ( getTeamName ( getPlayerTeam( source ) ) == 'Civilians' ) and ( getElementData ( source, 'Occupation' )) ~= 'Bus Driver' then 
        if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end 
           Timer[source] = setTimer(spawnPlayer,2000,1,source, -2258, 541, 35 ) 
        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...