Jump to content

كيف وضع اغنية في جيم مود


Recommended Posts

زاحف ادخل الويكي ذول اصواتت لما حد يجي يمووت

انا ابية مثل لما تدخل سيرفر و يخلص تحميل

ويبدا جيم مود يجي اغنية

function wasted (killer, weapon, bodypart)  
    local sound = playSound("sounds/wasted.mp3") --Play wasted.mp3 from the sounds folder 
    setSoundVolume(sound, 0.5) -- set the sound volume to 50% 
end 
  
addEventHandler("onClientPlayerWasted", getLocalPlayer(), wasted) --add the event handler 

Edited by Guest
Link to comment

شوف كود

function wasted (killer, weapon, bodypart)  
    local sound = playSound("sounds/wasted.mp3") --Play wasted.mp3 from the sounds folder 
    setSoundVolume(sound, 0.5) -- set the sound volume to 50% 
end 
  
addEventHandler("onClientPlayerWasted", getLocalPlayer(), wasted) --add the event handler 

Link to comment

--- كلينت

addEvent ( 'Sound', true ) 
addEventHandler ( 'Sound', root, 
function ( ) 
 local sound = playSound("sounds/join.mp3") 
  setSoundVolume(sound, 0.5) 
end 
) 
  
addEvent ( 'Stop', true ) 
addEventHandler ( 'Stop', root, 
function ( ) 
   destroyElement ( sound ) 
end 
) 

--- سيرفر

addEventHandler ( 'onPlayerJoin', resourceRoot, 
 function  ( ) 
 triggerClientEvent ( source, 'Sound', source ) 
end 
) 
  
addEventHandler ( 'onPlayerSpawn', resourceRoot, 
function ( ) 
triggerClientEvent ( source, 'Stop', source ) 
end 
) 
Link to comment
--- كلينت

addEvent ( 'Sound', true ) 
addEventHandler ( 'Sound', root, 
function ( ) 
 local sound = playSound("sounds/join.mp3") 
  setSoundVolume(sound, 0.5) 
end 
) 
  
addEvent ( 'Stop', true ) 
addEventHandler ( 'Stop', root, 
function ( ) 
   destroyElement ( sound ) 
end 
) 

--- سيرفر

addEventHandler ( 'onPlayerJoin', resourceRoot, 
 function  ( ) 
 triggerClientEvent ( source, 'Sound', source ) 
end 
) 
  
addEventHandler ( 'onPlayerSpawn', resourceRoot, 
function ( ) 
triggerClientEvent ( source, 'Stop', source ) 
end 
) 

يا ايش كل هاد

ثاني اشي كيف بدة يشغل الموسيقى اذا ما كانت نازلة على الجهاز

Link to comment

onClientPlayerJoin : local player joins the server before their client-side resources are started

يعني تشتغل السكربت قبل مايخش الاعب السيرفر

اذا يبيه على طول بعد مايخش الاعب

يغير السكربت سيرفر زي ماعطيته . .

Link to comment
onClientPlayerJoin : local player joins the server before their client-side resources are started

يعني تشتغل السكربت قبل مايخش الاعب السيرفر

اذا يبيه على طول بعد مايخش الاعب

يغير السكربت سيرفر زي ماعطيته . .

و هاد شو

تقدر تسوية هيك
addEventHandler( "onClientResourceStart", getRootElement( ), 
    function () 
      sound = playSound("sounds.mp3") 
    end 
) 

او تسوية

هيك

من دون حدث

local sound = playSound("sound.mp3") 

و يشغل المود بعد ما يحمل + كودك ما راح يطفي الموسيقى

Edited by Guest
Link to comment
onClientPlayerJoin : local player joins the server before their client-side resources are started

يعني تشتغل السكربت قبل مايخش الاعب السيرفر

اذا يبيه على طول بعد مايخش الاعب

يغير السكربت سيرفر زي ماعطيته . .

و هاد شو

تقدر تسوية هيك
addEventHandler( "onClientResourceStart", getRootElement( ), 
    function () 
      sound = playSound("sounds.mp3") 
    end 
) 

او تسوية

هيك

من دون حدث

local sound = playSound("sound.mp3") 

و يشغل المود بعد ما يحمل + كودك ما راح يطفي الموسيقى

انا ابية مثل لما تدخل سيرفر و يخلص تحميل

ويبدا جيم مود يجي اغنية

+

الا يطفي الموسيقي بعد ماالاعب يخش اللعبه يعني يختار شخصية او يبدا اللعب

'onPlayerSpawn'

يقدر يسوي تايمر اذا يبي . . .

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