**getVehicleSirenParams **
Client and Server function
This function get the parameters of a vehicles siren.
Syntax :
table getVehicleSirenParams ( vehicle theVehicle )
Required Arguments :
theVehicle: The vehicle to get the siren parameters of
Returns :
Returns a table with the siren count, siren type and a sub table for the four flags. False otherwise.
[int] SirenParams.SirenCount [int] SirenParams.SirenType [table] SirenParams.Flags [bool] SirenParams.Flags["360"] [bool] SirenParams.Flags.DoLOSCheck [bool] SirenParams.Flags.UseRandomiser [bool] SirenParams.Flags.Silent
... -- مههم ذذ
# اول شي اقرأ كل اللي فوق عشان تفهمه كويس وتعرفه وتعرف انوأع الأنذأرأت
# الفنكشن ذا بـ اختصصأر يجيب لكـ انذار السيارة
# ممكن تكون مسويهه عبر فنشكن setVehicleSirens Or addVehicleSirens
# صراحة الفنكششن ما قد جربته , وما اعرف كثير له , شف مثـأل الويكي
addEventHandler("onVehicleEnter",root,function(player,seat) if(player)and(seat==0)then addVehicleSirens(source,1,1) setVehicleSirens(source,1,0,0,0,100,0,100,255,122) bindKey(player,"g","up",getSiren,source) end end) function getSiren(player,button,state,vehicle) local sirenParams = getVehicleSirenParams(vehicle) outputChatBox("Here's the parameters of your vehicle sirens: Siren Points: "..tostring(sirenParams.SirenCount)..", Type of Siren: "..tostring(sirenParams.SirenType)..".",player) end addEventHandler("onVehicleExit",root,function(player,seat) if(player)and(seat==0)then removeVehicleSirens(source) unbindKey(player,"g","up",getSiren) end end)
# ومأ ادري من وين جبته خخخ , الواحد يسسأل على فنكشن يسستفيد منه مو اي شي ذذ
ههههه ذا لي ايام احاول افهمه
من المثال
المهم مشكور ع شرح