Jump to content

كود ---


Recommended Posts

معي شيك بوكس

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

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

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

+

-----------

معي شيك بوكس

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

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

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

+

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

معي شيك بوكس

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

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

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

+

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

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

Link to comment

سلم يابني

+

لطلبك الاول

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

+

طلبك التاني

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

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

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

Link to comment

السلام عليكم :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 ) 

Link to comment

اهنيككك ,

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

تفضل :

  
-- 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
Link to comment
اهنيككك ,

تفضل :

  
-- 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 وين معرفها؟

Link to comment
اهنيككك ,

تفضل :

  
-- 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 
Link to comment

الطلب الاول

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

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

Link to comment

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

Link to comment

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

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

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

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

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

و بس ~,~

كيف مثلا :|

getPedOccupiedVehicle 
createObject 
attachElements 
destroyElement 

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