Jump to content

Abdul KariM

Members
  • Posts

    2,711
  • Joined

  • Days Won

    42

Posts posted by Abdul KariM

  1. 5 minutes ago, xBeSoOo_ said:
    
    local sounds = {
    --[["sound download link"]]
    'https://g.top4top.io/m_1598i8jrg1.mp3',
    }
    
    local song_N = 1
    
    function isSoundFinished(theSound)
        return ( getSoundPosition(theSound) == getSoundLength(theSound) )
    end
    
    function onResourceStart()
        sound = playSound3D(sounds[1], 144.89999, -1939.3, 3.5) 
      	setElementDimension(sound,0)
      	setSoundMaxDistance(sound, 100)
    end
    addEventHandler("onClientResourceStart", resourceRoot, onResourceStart)
    
    addCommandHandler("sound", function ()
        if isElement(sound) then
            destroyElement(sound)
    		outputChatBox("تم اقاف الأغاني")
        end
    end)
    
    function next_s(song_N,sound)
    	if isSoundFinished(sound) and isElement(sound) then
    		if song_N ~= #sounds then
    			song_N = song_N +1
    			sound = playSound3D(sounds[song_N], 144.89999, -1939.3, 3.5) 
    		else
    			song_N = 1
    			sound = playSound3D(sounds[song_N], 144.89999, -1939.3, 3.5)
    		end
    	end
    end
    setTimer(next_s,3000,0,song_N,sound)
    

    جرب و قولي لاني ما جربت

    أفضل شي يكون التايمر بطول الصوت الي بيشغله

    أحسن من أنه يتأكد من وجود صوت كل ٣ ثواني

  2. 2 hours ago, -Ilker. said:
    
    local Count = 0 
    
    local vehicles = { }
    
    for k=1,10 do 
    vehicles[k] = createVehicle ( 411 , 0+k*3 , 0 , 3 )
    end
    
    addCommandHandler ( "wcar" , function ( player ) 
    Count = Count + 1 
    setElementData ( player , "Ped:"..tostring(Count) , true )
    if ( isElement ( vehicles[Count] ) ) then 
    warpPedIntoVehicle ( player , vehicles[Count] )
    end 
    end ) ; 
    

     

    هذا مثال سويته لك وانت طبقه ع الي انت تبي تسويه

     المفروض يكون فيه تحقق ان الاعب ماعنده داتا 

    لان الارقمنت سترنق بالاساسtostring ومايحتاج 

    • Like 1
  3. افضل شي انك تسوي ترايقر للوحة الادمن ومن لوحة الادمن ترجع بترايقر للكلينت بأحداثيات الاعب

×
×
  • Create New...