Jump to content

تصحيح كود


Recommended Posts

Posted (edited)

سلام عليكم

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

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

Edited by Guest
Posted

اتوقعع سذآ

addEventHandler("onClientMouseEnter", button, 
 function () 
   if isElement ( sound ) then destroyElement ( sound ) end 
 sound = playSound("Enksar.mp3") 
 setSoundVolume(sound, 0.5) 
  end 
) 

Posted

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

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

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

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

Posted

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

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 )

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

Posted

-- 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 
) 
Posted

ما اشتغل :\

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

صوره توضيحيه

O8gJD.png

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

Posted

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

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

-- 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 
) 
Posted

ي The Best ارسل لك الكود في الخاص تشوف وش هرجته ؟ ض

لان احس ان ملف السيرفر ما فيه اي خطآ :|

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