Jump to content

تعديل كود لاهنتوا


Recommended Posts

طيب خلاص ي شباب

ابي منكم تعدلوا هذي الكود

sound = playSound3D( url, 1496.7551269531, 786.17156982422, 113.31844329834 ) 
if sound then 
setSoundVolume ( sound, 400 ) 
setSoundMaxDistance(sound, 400) 
end 
end 
) 

ابيها لمن يدخل كول شيب يسمع الصوت ..

وشكرآ

Link to comment

local Col = createColSphere ( x, y, z, 1 ) --- x, y, z change to position 
local url = "http://www.google.com/sound.mp3" --- url of the song 
addEventHandler('onClientColShapeHit', Col, 
 function ( uPlayer ) 
 if ( getElementType ( uPlayer ) == localPlayer )  then 
    sound = playSound3D( url, 1496.7551269531, 786.17156982422, 113.31844329834 ) 
    setSoundVolume ( sound, 0.5 ) 
    setSoundMaxDistance(sound, 10) 
   end 
 end 
) 
  
addEventHandler( 'onClientColShapeLeave', Col , 
   function ( uPlayer ) 
   if ( getElementType ( uPlayer ) == localPlayer ) then 
   stopSound(sound) 
    end 
 end 
 ) 
Edited by Guest
Link to comment
local Col = createColSphere ( x, y, z, 1 ) 
local url = "http://www.google.com/sound.mp3" 
addEventHandler('onColShapeHit', Col, 
 function ( uPlayer ) 
    if ( getElementType ( uPlayer ) == 'player' )  then 
    sound = playSound3D( url, 1496.7551269531, 786.17156982422, 113.31844329834 ) 
    setSoundVolume ( sound, 0.5 ) 
    setSoundMaxDistance(sound, 10) 
   end 
 end 
) 

onColShapeHit > onClientColShapeHit

getElementType > getLocalPlayer

_ + لزوم تطفي الاغنية يوم يخرج اللاعب

Link to comment
local Col = createColSphere ( x, y, z, 1 ) 
local url = "http://www.google.com/sound.mp3" 
addEventHandler('onColShapeHit', Col, 
 function ( uPlayer ) 
    if ( getElementType ( uPlayer ) == 'player' )  then 
    sound = playSound3D( url, 1496.7551269531, 786.17156982422, 113.31844329834 ) 
    setSoundVolume ( sound, 0.5 ) 
    setSoundMaxDistance(sound, 10) 
   end 
 end 
) 

حدث سيرفر مع فنكشنات كلنت

+ كذا بتخليه اذا دخل الكول شيب بيصير الاغنية

3D

يعني الي قريب من الكول شيب بيسمعها

هو قصده اذا خش الكول شيب يسمعه لحاله الاعب

عالعموم الكود يصير كذا

local Col = createColSphere ( x, y, z, 1 ) 
local url = "http://www.google.com/sound.mp3" 
addEventHandler('onClientColShapeHit', Col, 
 function ( element) 
    if element == getLocalPlayer() then 
    sound = playSound( url,true ) 
    setSoundVolume ( sound, 0.5 ) 
   end 
 end 
) 
--- 
addEventHandler('onClientColShapeLeave',Col, 
function (element) 
if element == getLocalPlayer() then 
stopSound(sound) 
end 
end 
) 
Edited by Guest
Link to comment
local Col = createColSphere ( x, y, z, 1 ) 
local url = "http://www.google.com/sound.mp3" 
addEventHandler('onColShapeHit', Col, 
 function ( uPlayer ) 
    if ( getElementType ( uPlayer ) == 'player' )  then 
    sound = playSound3D( url, 1496.7551269531, 786.17156982422, 113.31844329834 ) 
    setSoundVolume ( sound, 0.5 ) 
    setSoundMaxDistance(sound, 10) 
   end 
 end 
) 

onColShapeHit > onClientColShapeHit

getElementType > getLocalPlayer

_ + لزوم تطفي الاغنية يوم يخرج اللاعب

اي والله نسيت انه كلينت ,

+ هو ماطلب يوقف الاغنية ,

لاكن لعيونك بضبطه ذذ

تم التعديل #

Link to comment
local Col = createColSphere ( x, y, z, 1 ) 
local url = "http://www.google.com/sound.mp3" 
addEventHandler('onColShapeHit', Col, 
 function ( uPlayer ) 
    if ( getElementType ( uPlayer ) == 'player' )  then 
    sound = playSound3D( url, 1496.7551269531, 786.17156982422, 113.31844329834 ) 
    setSoundVolume ( sound, 0.5 ) 
    setSoundMaxDistance(sound, 10) 
   end 
 end 
) 

حدث سيرفر مع فنكشنات كلنت

+ كذا بتخليه اذا دخل الكول شيب بيصير الاغنية

3D

يعني الي قريب من الكول شيب بيسمعها

هو قصده اذا خش الكول شيب يسمعه لحاله الاعب

عالعموم الكود يصير كذا

[b]local Col = createColSphere ( x, y, z, 1 ) 
local url = "http://www.google.com/sound.mp3" 
addEventHandler('onClientColShapeHit', Col, 
 function ( element) 
    if element == getLocalPlayer() then 
    sound = playSound( url,true ) 
    setSoundVolume ( sound, 0.5 ) 
   end 
 end 
) 
--- 
addEventHandler('onClientColShapeLeave',Col, 
function (element) 
if element == getLocalPlayer() then 
stopSound(sound) 
end 
end 
)[/b] 

ادري والله , بس انا نسيت ان فيه كلينت ايفنت ,للكولشيب ,

+ ليه تستخدم getLocalPlayer() ,

اختصرها , localPlayer ,

Link to comment
onColShapeHit > onClientColShapeHit

getElementType > getLocalPlayer

_ + لزوم تطفي الاغنية يوم يخرج اللاعب

اي والله نسيت انه كلينت ,

+ هو ماطلب يوقف الاغنية ,

لاكن لعيونك بضبطه ذذ

تم التعديل #

كودكـ لحد الآن فيه أخطاء حتى بعد التعديل

. بالنسبة لصاحب الموضوع إستخدم كود فيس بوك وإنتهى الموضوع -

Link to comment

شكرأ لكم ..

عندي كود ذا

    addEventHandler ("onClientMarkerHit", اسم الماركر, 
    function ( hitPlayer ) 
        local mm = getPlayerTeam ( hitPlayer ) 
            if getElementType ( hitPlayer ) == "player" and mm and getTeamName ( mm ) == "اسم التيم" then 
                guiSetVisible ( اسم اللوحة, not guiGetVisible ( اسم اللوحة ) ) 
            end 
        end 
    ) 

فين احط احداثيات الماركر ؟ !!!

Link to comment

local theMarker = createMarker ( X,Y, Z, "corona", 5, 0, 0, 0, 0 )  -- x, y , z position 
addEventHandler ("onClientMarkerHit", theMarker, 
    function ( ) 
if ( isElement( localPlayer) ) and ( getElementType( localPlayer ) == "player" ) and getPlayerTeam(getTeamName( localPlayer ) == 'Name' ) then ---- Change Name to the team name 
 guiSetVisible ( GUIEditorWindow[1], true ) ---- Chabge GUIEditorWindow[1] to window name  
    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...