Mr.Mostafa Posted June 13, 2018 Posted June 13, 2018 سلام عليكم ابي لما احدد علي شيك بوكس يحط الوان سريعة عشوائية ورا بعض مرة للموتر وكدا ما ظبطت وش المشكلة ؟ --- # Client addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.checkbox[1] then if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true) then UnlimtedColorsTimer = setTimer(function() triggerServerEvent( 'vehColorRandom', localPlayer ) end, 200, 0) else if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == false) then killTimer(UnlimtedColorsTimer) end end end end ) --- # Server addEvent( 'vehColorRandom', true ) addEventHandler( 'vehColorRandom', root, function( uPlayer ) if isPedInVehicle( uPlayer ) then local uVehicle = getPedOccupiedVehicle( uPlayer ) if uVehicle then setVehicleColor(uVehicle, math.random(0, 255), math.random(0, 255), math.random(0, 255)) end end end )
+Source|> Posted June 13, 2018 Posted June 13, 2018 12 minutes ago, Mr.Mostafa said: uVehicle uVehicle = معرفه ؟
Mr.Mostafa Posted June 13, 2018 Author Posted June 13, 2018 14 minutes ago, Mr.Mostafa said: local uVehicle = getPedOccupiedVehicle( uPlayer ) ..
+Source|> Posted June 13, 2018 Posted June 13, 2018 4 minutes ago, Mr.Mostafa said: .. addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.checkbox[1] then if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true) then UnlimtedColorsTimer = setTimer(function() triggerServerEvent( 'vehColorRandom', localPlayer ) end, 200, 0) elseif (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == false) then killTimer(UnlimtedColorsTimer) end end end ) addEvent( 'vehColorRandom', true ) addEventHandler( 'vehColorRandom', root, function( uPlayer ) if isPedInVehicle( uPlayer ) then local uVehicle = getPedOccupiedVehicle( uPlayer ) if uVehicle then setVehicleColor(uVehicle, math.random(0, 255), math.random(0, 255), math.random(0, 255)) end end end ) جربب
#Major . Posted June 13, 2018 Posted June 13, 2018 --- # Client addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.checkbox[1] then if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true) then UnlimtedColorsTimer = setTimer(function() triggerServerEvent( 'vehColorRandom', localPlayer ) end, 200, 0) else killTimer(UnlimtedColorsTimer) end end end ) --- # Server addEvent( 'vehColorRandom', true ) addEventHandler( 'vehColorRandom', root, function( uPlayer ) if isPedInVehicle( uPlayer ) then local uVehicle = getPedOccupiedVehicle( uPlayer ) if uVehicle then local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( uVehicle, r, g, b ) end end end )
Mr.Mostafa Posted June 13, 2018 Author Posted June 13, 2018 6 minutes ago, *RayaN-Alharbi. said: --- # Client addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.checkbox[1] then if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true) then UnlimtedColorsTimer = setTimer(function() triggerServerEvent( 'vehColorRandom', localPlayer ) end, 200, 0) else killTimer(UnlimtedColorsTimer) end end end ) --- # Server addEvent( 'vehColorRandom', true ) addEventHandler( 'vehColorRandom', root, function( uPlayer ) if isPedInVehicle( uPlayer ) then local uVehicle = getPedOccupiedVehicle( uPlayer ) if uVehicle then local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( uVehicle, r, g, b ) end end end ) ما اشتغل + ملحوظة كود السيرفر والكلنت دول هما بس الي بالمود هل في اكواد تانية اضيفها عشان يلون ولا وش
#Major . Posted June 13, 2018 Posted June 13, 2018 Just now, Mr.Mostafa said: ما اشتغل + ملحوظة كود السيرفر والكلنت دول هما بس الي بالمود هل في اكواد تانية اضيفها عشان يلون ولا وش موجودة اكواد الوحة؟؟
Mr.Mostafa Posted June 13, 2018 Author Posted June 13, 2018 1 minute ago, *RayaN-Alharbi. said: موجودة اكواد الوحة؟؟ يب اكيد بس الي اقصده ان الاكواد المتعلقة بالتلوين الكود حق الكلنت والسيرفر الي فوق دول بس يعني مافي اي اكواد تانية عشان لو يمكن اضيف اكواد تانية او شي + ما اشتغل كودك
#Major . Posted June 13, 2018 Posted June 13, 2018 --- # Client addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.checkbox[1] then if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true) then ST = "Start" triggerServerEvent( 'vehColorRandom', localPlayer,ST ) else ST = "Stop" triggerServerEvent( 'vehColorRandom', localPlayer,ST ) end end end ) --- # Server addEvent( 'vehColorRandom', true ) addEventHandler( 'vehColorRandom', root, function( uPlayer,ST ) if ( ST == "Start" ) then if isPedInVehicle( uPlayer ) then local uVehicle = getPedOccupiedVehicle( uPlayer ) if uVehicle then mathColor = setTimer(function( ) local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( uVehicle, r, g, b ) end,200,0 ) end end else if mathColor then killTimer(mathColor) end end end )
Mr.Mostafa Posted June 13, 2018 Author Posted June 13, 2018 5 minutes ago, *RayaN-Alharbi. said: --- # Client addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.checkbox[1] then if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true) then ST = "Start" triggerServerEvent( 'vehColorRandom', localPlayer,ST ) else ST = "Stop" triggerServerEvent( 'vehColorRandom', localPlayer,ST ) end end end ) --- # Server addEvent( 'vehColorRandom', true ) addEventHandler( 'vehColorRandom', root, function( uPlayer,ST ) if ( ST == "Start" ) then if isPedInVehicle( uPlayer ) then local uVehicle = getPedOccupiedVehicle( uPlayer ) if uVehicle then mathColor = setTimer(function( ) local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) setVehicleColor( uVehicle, r, g, b ) end,200,0 ) end end else if mathColor then killTimer(mathColor) end end end ) نفس المشكلة اللون ما يحصل له اي شي
#Major . Posted June 13, 2018 Posted June 13, 2018 1 minute ago, Mr.Mostafa said: نفس المشكلة اللون ما يحصل له اي شي الدي بق؟
Mr.Mostafa Posted June 13, 2018 Author Posted June 13, 2018 3 minutes ago, *RayaN-Alharbi. said: الدي بق؟ ما يطلع شي
+Source|> Posted June 13, 2018 Posted June 13, 2018 14 minutes ago, Mr.Mostafa said: ما يطلع شي جرب ذولا addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.checkbox[1] then if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true) then UnlimtedColorsTimer = setTimer(function() triggerServerEvent( 'vehColorRandom', localPlayer ) end, 200, 0) else if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == false) then killTimer(UnlimtedColorsTimer) end end end end ) addEvent( 'vehColorRandom', true ) addEventHandler( 'vehColorRandom', root, function( ) if isPedInVehicle( source ) then local uVehicle = getPedOccupiedVehicle( source ) if uVehicle then setVehicleColor(uVehicle, math.random(0, 255), math.random(0, 255), math.random(0, 255)) end end end )
Mr.Mostafa Posted June 13, 2018 Author Posted June 13, 2018 11 minutes ago, +Source|> said: جرب ذولا addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.checkbox[1] then if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true) then UnlimtedColorsTimer = setTimer(function() triggerServerEvent( 'vehColorRandom', localPlayer ) end, 200, 0) else if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == false) then killTimer(UnlimtedColorsTimer) end end end end ) addEvent( 'vehColorRandom', true ) addEventHandler( 'vehColorRandom', root, function( ) if isPedInVehicle( source ) then local uVehicle = getPedOccupiedVehicle( source ) if uVehicle then setVehicleColor(uVehicle, math.random(0, 255), math.random(0, 255), math.random(0, 255)) end end end ) ما اشتغل
+Source|> Posted June 13, 2018 Posted June 13, 2018 1 minute ago, Mr.Mostafa said: ما اشتغل تراه شغال معي انت مسوي شي غلط
SycroX Posted June 13, 2018 Posted June 13, 2018 addEventHandler("onClientGUIClick", guiRoot, function () if source == GUIEditor.checkbox[1] then if guiCheckBoxGetSelected(GUIEditor.checkbox[1]) then triggerServerEvent("vehColorRandom", localPlayer, true) else triggerServerEvent("vehColorRandom", localPlayer, false) end end end ) ---#Server local timers = {} addEvent("vehColorRandom", true ) addEventHandler("vehColorRandom", root, function(bool) if isPedInVehicle(source) then local vehicle = getPedOccupiedVehicle(source) if vehicle then if bool then if timers[source] then return end timers[source] = setTimer(setVehicleColor, 200, 0, vehicle, math.random(0, 255), math.random(0, 255), math.random(0, 255)) else if timers[source] then killTimer(timers[source]) timers[source] = nil end end end end end )
Mr.Mostafa Posted June 13, 2018 Author Posted June 13, 2018 7 minutes ago, #x1AhMeD,-09 said: addEventHandler("onClientGUIClick", guiRoot, function () if source == GUIEditor.checkbox[1] then if guiCheckBoxGetSelected(GUIEditor.checkbox[1]) then triggerServerEvent("vehColorRandom", localPlayer, true) else triggerServerEvent("vehColorRandom", localPlayer, false) end end end ) ---#Server local timers = {} addEvent("vehColorRandom", true ) addEventHandler("vehColorRandom", root, function(bool) if isPedInVehicle(source) then local vehicle = getPedOccupiedVehicle(source) if vehicle then if bool then if timers[source] then return end timers[source] = setTimer(setVehicleColor, 200, 0, vehicle, math.random(0, 255), math.random(0, 255), math.random(0, 255)) else if timers[source] then killTimer(timers[source]) timers[source] = nil end end end end end ) ما اشتغل + اعتقد المشكلة من عندي يمكن من الموتر مدري بس خلاص مب مهم -
Rakan# Posted June 13, 2018 Posted June 13, 2018 1 hour ago, Mr.Mostafa said: ما اشتغل + اعتقد المشكلة من عندي يمكن من الموتر مدري بس خلاص مب مهم - ممكن لأنك .. ماتغير التحديد الخاص بـ checkbox يعني تشغل المود وتتركه زي ماهو.. جرب شيل التحديد وارجع حطه لو مانفع من الموتر اللي تستعمله ممكن
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now