Jump to content

كود ---


Recommended Posts

Posted

معي شيك بوكس

عاوز لما اضغط عليه

يجي دخان و لما اضغط عليه تاني يعني

اشيل التحديد يختفي الدخان

+

-----------

معي شيك بوكس

عاوز لما اضغط عليه

العربية ما تتفجر ولا تتكسر يعمي لما افجر نفسي من محطة الوقود ما تتفجر و لما اضغط عليه تاني يعني

اشيل التحديد العربية تتفجر و تتكسر عادي

+

-------------------

معي شيك بوكس

عاوز لما اضغط عليه

يجي نيترو و لما اضغط عليه تاني يعني

اشيل التحديد يختفي النيترو

+

--------------

معي بوطن عاوز لما اضغط عليه يصلح السيارة

Posted

سلم يابني

+

لطلبك الاول

مافي شيء اسمه دخان وضح طلبك

+

طلبك التاني

تفضل الفنكشنات وحاول سويه حتى لو هريس

  
-- Client 
'onClientGUIClick' 
guiCheckBoxGetSelected 
triggerServerEvent 
  

  
-- Server 
getPedOccupiedVehicle 
setTimer -- خله كل 500 مليثانية يصلح سيارة 
fixVehicle 
  

بنسبة اذا شليت التحديد سوي كده

  
-- Client 
'onClientGUIClick' 
guiCheckBoxGetSelected 
triggerServerEvent 
  

  
-- Server 
isTimer 
killTimer 
  

--

الطلب الثاني

  
-- Client 
'onClientGUIClick' 
guiCheckBoxGetSelected 
triggerServerEvent 
  

  
-- Server 
getPedOccupiedVehicle 
addVehicleUpgrade -- 1010 
  

واذا شال التحديد سوي كذا

  
-- Client 
'onClientGUIClick' 
guiCheckBoxGetSelected 
triggerServerEvent 
  

  
--Server 
getPedOccupiedVehicle 
removeVehicleUpgrade -- 1010 
  

--

الطلب الرابع

  
-- Client 
'onClientGUIClick' 
triggerServerEvent 
  

  
-- Server 
fixVehicle 
  

حاول ترا سهل جداً جداً

Posted

السلام عليكم :mrgreen::mrgreen:

الطلب الاول

في خطا ؟؟

addEventHandler('onClientGUIClick',root, 
function () 
if source == GUIEditor.checkbox[4] and guiComboBoxGetSelected(GUIEditor.checkbox[4]) == true then 
triggerServerEvent('FixNow',localPlayer) 
elseif guiCheckBoxGetSelected (GUIEditor.checkbox[4]) == false then 
if isTimer (Timer) then killTimer (Timer) end 
end 
end 
) 
  

server

addEventHandler('FixNow',root, 
function ( source ) 
          local theVehicle = getPedOccupiedVehicle ( thePlayer ) 
               if vehicle[source] and isElement(vehicle[source]) then 
       fixVehicle(vehicle[source]) 
Timer = setTimer (triggerServerEvent_,500,0) 
end ) 

Posted (edited)

اهنيككك ,

وعليكم السلام

تفضل :

  
-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
if source == GUIEditor.checkbox[4] and guiComboBoxGetSelected(GUIEditor.checkbox[4]) == true then 
triggerServerEvent('FixNow',localPlayer) 
elseif guiCheckBoxGetSelected (GUIEditor.checkbox[4]) == false then 
if isTimer (Timer) then return killTimer (Timer) end 
end 
end 
) 
  

  
-- Server  
addEventHandler('FixNow',root, 
function ( ) 
          local Veh = getPedOccupiedVehicle ( source ) 
          Timer = setTimer( function () 
          fixVehicle(Veh) 
          end,500,1) 
end ) 
  

Edited by Guest
Posted
اهنيككك ,

تفضل :

  
-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
if source == GUIEditor.checkbox[4] and guiComboBoxGetSelected(GUIEditor.checkbox[4]) == true then 
triggerServerEvent('FixNow',localPlayer) 
elseif guiCheckBoxGetSelected (GUIEditor.checkbox[4]) == false then 
if isTimer (Timer) then retrun killTimer (Timer) end 
end 
end 
) 
  

  
-- Server  
addEventHandler('FixNow',root, 
function ( ) 
          local Veh = getPedOccupiedVehicle ( thePlayer ) 
          setTimer( function () 
          fixVehicle(Veh) 
          end,500,1) 
end ) 
  

والله اهنيك انت thePlayer وين معرفها؟

Posted
اهنيككك ,

تفضل :

  
-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
if source == GUIEditor.checkbox[4] and guiComboBoxGetSelected(GUIEditor.checkbox[4]) == true then 
triggerServerEvent('FixNow',localPlayer) 
elseif guiCheckBoxGetSelected (GUIEditor.checkbox[4]) == false then 
if isTimer (Timer) then retrun killTimer (Timer) end 
end 
end 
) 
  

  
-- Server  
addEventHandler('FixNow',root, 
function ( ) 
          local Veh = getPedOccupiedVehicle ( thePlayer ) 
          setTimer( function () 
          fixVehicle(Veh) 
          end,500,1) 
end ) 
  

X

retrun  =   return 
Posted

الطلب الاول

مش شغال العربية تتفجر

-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
if source == GUIEditor.checkbox[4] and guiComboBoxGetSelected(GUIEditor.checkbox[4]) == true then 
triggerServerEvent('FixNow',localPlayer) 
elseif guiCheckBoxGetSelected (GUIEditor.checkbox[4]) == false then 
if isTimer (Timer) then return killTimer (Timer) end 
end 
end 
) 

-- Server 
addEventHandler('FixNow',root, 
function ( ) 
          local Veh = getPedOccupiedVehicle ( source ) 
          Timer = setTimer( function () 
          fixVehicle(Veh) 
          end,500,1) 
end ) 

-----------------------------------------------------------------------------------------------------------

الطلب الثاني في خطا ؟

  
-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
if source == GUIEditor.checkbox[1] and guiComboBoxGetSelected(GUIEditor.checkbox[1]) == true then 
triggerServerEvent('netro',localPlayer) 
elseif guiCheckBoxGetSelected (GUIEditor.checkbox[1]) == false then 
if isTimer (Timer) then return killTimer (Timer) end 
end 
end 
) 
  

  
-- Server 
addEventHandler('netro',root, 
function ( ) 
          local Veh = getPedOccupiedVehicle ( source ) 
          addVehicleUpgrade(Veh) 
           
end ) 
  

-------------------------------------------------------------------------------------------

الطلب الثالث فيه خطأ ؟؟

  
-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
 if (source == GUIEditor.button[3]) then 
        triggerServerEvent("FixCar", localPlayer) 
end 
end 
) 
  

  
-- Server 
addEventHandler( 'FixCar', root, 
function ( ) 
if not isElement(vehicle[source]) then  
outputChatBox("[RentSystem]: ليس هناك سيارة لاصلاحها", source, 255, 0, 0, true) else 
    if vehicle[source] and isElement(vehicle[source]) then 
        fixVehicle(vehicle[source]) 
        outputChatBox('[RentSystem]: تم اصلاح سيارتك بنجاح  ', source ,0,255,0,true ) 
    end 
    end 
end ) 
end ) 
  

----------------------------------------------------------------------------------------------------------------

هنا كل ما اضغط علي الشيك بوكس

ما يشتغل

اضغط علي شيك بوكس تاني يشتغل

--#Client 
function triggerServerEvent_() 
triggerServerEvent("VehicleColor", localPlayer,r,g,b) 
r,g,b = math.random(0,255), math.random(0,255), math.random(0,255) 
end 
-- 
addEventHandler("onClientGUIClick", root,function() 
if guiCheckBoxGetSelected (GUIEditor.checkbox[2]) == true then 
if not isPedInVehicle(localPlayer) then return outputChatBox("[RentSystem]: يجب ان تكون في السيارة اولا",255, 0, 0, true)  end 
Timer = setTimer (triggerServerEvent_,500,0) 
outputChatBox('[RentSystem]: لقد تم تشغيل الأوان العشوائية بنجاح  ', 0,255,0,true ) 
elseif guiCheckBoxGetSelected (GUIEditor.checkbox[2]) == false then 
if isTimer (Timer) then killTimer (Timer) end 
end 
end) 

--#Server 
addEvent("VehicleColor", true) 
addEventHandler("VehicleColor", root,function(r,g,b) 
local vehicle = getPedOccupiedVehicle(source) 
setVehicleColor(vehicle, r,g,b) 
end) 

Posted

و بلنسبة لطلبي الاول

معي شيك بوكس

عاوز لما اضغط عليه

يجي دخان و لما اضغط عليه تاني يعني

اشيل التحديد يختفي الدخان

الصور اهه

146184654585491.png

146184654590932.png

146184752810641.png

146184752820282.png

Posted

  
-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
if source == GUIEditor.checkbox[4] and guiComboBoxGetSelected(GUIEditor.checkbox[4]) == true then 
triggerServerEvent('FixNow',localPlayer) 
elseif source == GUIEditor.checkbox[4] and guiCheckBoxGetSelected (GUIEditor.checkbox[4]) == false then 
triggerServerEvent('StopHealth',localPlayer) 
end 
end 
) 
  

  
--Server 
addEvent('FixNow',true) 
addEvent('StopHealth',true) 
  
addEventHandler('FixNow',root, 
function ( ) 
          local Veh = getPedOccupiedVehicle ( source ) 
          if getElementHealth(Veh) ~= 100 then 
          setElementHealth(Veh,100) 
end 
end ) 
  
addEventHandler('StopHealth',root, 
function () 
if getElementHealth(Veh) ~= 100 then return end 
end 
) 
  

--

  
-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
if source == GUIEditor.checkbox[1] and guiComboBoxGetSelected(GUIEditor.checkbox[1]) == true then 
triggerServerEvent('nitro',localPlayer) 
elseif source == GUIEditor.checkbox[1] and guiCheckBoxGetSelected (GUIEditor.checkbox[1]) == false then 
triggerServerEvent('StopNitro',localPlayer) 
end 
end 
) 
  

  
 addEvent('nitro',true) 
 addEvent('StopNitro',true) 
-- Server 
addEventHandler('nitro',root, 
function ( ) 
          local Veh = getPedOccupiedVehicle ( source ) 
          addVehicleUpgrade(Veh,1010) 
          
end ) 
  
addEventHandler('StopNitro',root, 
function () 
local Veh = getPedOccupiedVehicle ( source ) 
if not addVehicleUpgrade(Veh,1010) then return end 
removeVehicleUpgrade(Veh,1010) 
end 
) 
  

--

  
  
-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
 if (source == GUIEditor.button[3]) then 
        triggerServerEvent("FixCar", localPlayer) 
end 
end 
) 
  
  

  
--Server 
  
-- Server 
addEvent('FixCar',true) 
  
addEventHandler( 'FixCar', root, 
function ( ) 
if not isPedInVehicle ( source ) then 
local Veh = getPedOccupiedVehicle ( source ) 
        fixVehicle(Veh) 
        outputChatBox('[RentSystem]: تم اصلاح سيارتك بنجاح  ', source ,0,255,0,true ) 
else 
       outputChatBox('[RentSystem]: لايوجد سيارة لاصلاحها ', source ,0,255,0,true ) 
    end 
    end 
) 
  

--

  
 addEventHandler("onClientGUIClick", root,function() 
 if source == GUIEditor.checkbox[2] and guiCheckBoxGetSelected (GUIEditor.checkbox[2]) == true then 
 triggerServerEvent('StartRandomColor',localPlayer) 
 elseif  source == GUIEditor.checkbox[2] and guiCheckBoxGetSelected (GUIEditor.checkbox[2]) == false then 
 triggerServerEvent('StopRandomColor',localPlayer) 
  

  
--Server 
  
addEvent('StartRandomColor', true) 
addEvent('StopRandomColor',true) 
  
  
  
addEventHandler('StartRandomColor', root,function( ) 
local vehicle = getPedOccupiedVehicle(source) 
TimerColor = setTimer( function () 
setVehicleColor(vehicle, math.random(0,255), math.random(0,255), math.random(0,255) ) 
end,500,1) 
outputChatBox('[RentSystem]: لقد تم تشغيل الأوان العشوائية بنجاح  ', source) 
end) 
  
addEventHandler('StopRandomColor',root, 
function () 
if isTimer( TimerColor ) then return killTimer(TimerColor) end 
end 
) 
  

Posted
و بلنسبة لطلبي الاول
معي شيك بوكس

عاوز لما اضغط عليه

يجي دخان و لما اضغط عليه تاني يعني

اشيل التحديد يختفي الدخان

الصور اهه

146184654585491.png

146184654590932.png

146184752810641.png

146184752820282.png

طيب و ده

:arrowup::arrowup:

Posted
و بلنسبة لطلبي الاول
معي شيك بوكس

عاوز لما اضغط عليه

يجي دخان و لما اضغط عليه تاني يعني

اشيل التحديد يختفي الدخان

الصور اهه

146184654585491.png

146184654590932.png

146184752810641.png

146184752820282.png

طيب و ده

:arrowup::arrowup:

هذا دخان انت مسويةة ,

Posted

شوف في اوبجكت يعطي دخان

سوي لو ركب سياره يحط الاوبجكت دا و يلزقه +

لو نزل من السياره يشيله

و بس ~,~

Posted

استخدم هذا الفنكشن عشان تحمي السيارهـ من كل شيء ومايتسبب لها ضرر

setVehicleDamageProof 

مايحتاج تايمر يصلح السياره كل مده معينه

Posted
شوف في اوبجكت يعطي دخان

سوي لو ركب سياره يحط الاوبجكت دا و يلزقه +

لو نزل من السياره يشيله

و بس ~,~

كيف مثلا :|

Posted

  
-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
if source == GUIEditor.checkbox[4] and guiComboBoxGetSelected(GUIEditor.checkbox[4]) == true then 
triggerServerEvent('FixNow',localPlayer) 
elseif source == GUIEditor.checkbox[4] and guiCheckBoxGetSelected (GUIEditor.checkbox[4]) == false then 
triggerServerEvent('StopHealth',localPlayer) 
end 
end 
) 
  

  
--Server 
addEvent('FixNow',true) 
addEvent('StopHealth',true) 
  
addEventHandler('FixNow',root, 
function ( ) 
          local Veh = getPedOccupiedVehicle ( source ) 
          if getElementHealth(Veh) ~= 100 then 
          setElementHealth(Veh,100) 
end 
end ) 
  
addEventHandler('StopHealth',root, 
function () 
if getElementHealth(Veh) ~= 100 then return end 
end 
) 
  

--

  
-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
if source == GUIEditor.checkbox[1] and guiComboBoxGetSelected(GUIEditor.checkbox[1]) == true then 
triggerServerEvent('nitro',localPlayer) 
elseif source == GUIEditor.checkbox[1] and guiCheckBoxGetSelected (GUIEditor.checkbox[1]) == false then 
triggerServerEvent('StopNitro',localPlayer) 
end 
end 
) 
  

  
 addEvent('nitro',true) 
 addEvent('StopNitro',true) 
-- Server 
addEventHandler('nitro',root, 
function ( ) 
          local Veh = getPedOccupiedVehicle ( source ) 
          addVehicleUpgrade(Veh,1010) 
          
end ) 
  
addEventHandler('StopNitro',root, 
function () 
local Veh = getPedOccupiedVehicle ( source ) 
if not addVehicleUpgrade(Veh,1010) then return end 
removeVehicleUpgrade(Veh,1010) 
end 
) 
  

--

  
  
-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
 if (source == GUIEditor.button[3]) then 
        triggerServerEvent("FixCar", localPlayer) 
end 
end 
) 
  
  

  
--Server 
  
-- Server 
addEvent('FixCar',true) 
  
addEventHandler( 'FixCar', root, 
function ( ) 
if not isPedInVehicle ( source ) then 
local Veh = getPedOccupiedVehicle ( source ) 
        fixVehicle(Veh) 
        outputChatBox('[RentSystem]: تم اصلاح سيارتك بنجاح  ', source ,0,255,0,true ) 
else 
       outputChatBox('[RentSystem]: لايوجد سيارة لاصلاحها ', source ,0,255,0,true ) 
    end 
    end 
) 
  

--

  
 addEventHandler("onClientGUIClick", root,function() 
 if source == GUIEditor.checkbox[2] and guiCheckBoxGetSelected (GUIEditor.checkbox[2]) == true then 
 triggerServerEvent('StartRandomColor',localPlayer) 
 elseif  source == GUIEditor.checkbox[2] and guiCheckBoxGetSelected (GUIEditor.checkbox[2]) == false then 
 triggerServerEvent('StopRandomColor',localPlayer) 
  

  
--Server 
  
addEvent('StartRandomColor', true) 
addEvent('StopRandomColor',true) 
  
  
  
addEventHandler('StartRandomColor', root,function( ) 
local vehicle = getPedOccupiedVehicle(source) 
TimerColor = setTimer( function () 
setVehicleColor(vehicle, math.random(0,255), math.random(0,255), math.random(0,255) ) 
end,500,1) 
outputChatBox('[RentSystem]: لقد تم تشغيل الأوان العشوائية بنجاح  ', source) 
end) 
  
addEventHandler('StopRandomColor',root, 
function () 
if isTimer( TimerColor ) then return killTimer(TimerColor) end 
end 
) 
  

ولا كود من دول اشتغل

Posted
شوف في اوبجكت يعطي دخان

سوي لو ركب سياره يحط الاوبجكت دا و يلزقه +

لو نزل من السياره يشيله

و بس ~,~

كيف مثلا :|

getPedOccupiedVehicle 
createObject 
attachElements 
destroyElement 

Posted
        if getElementType ( pla ) == "player" then 
        local vehicle = getPlayerOccupiedVehicle ( pla ) 
            if vehicle  then ------- كدا تختار  لازم سيارة 
  
            
  

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