Jump to content

تصحيح خطأ


Recommended Posts

ايه الخطاء هنا

setTimer(function() 
guiSetProperty( GUIEditor.checkbox[1], "NormalTextColour", math.random(0,255), math.random(0,255), math.random(0,255)) 
end, 50, 0) 
  

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

هنا الكلام يتكرر في الشات

كلنت

--#Client 
addEventHandler("onClientGUIClick", root, 
function() 
    if source ==  GUIEditor.checkbox[2] and guiCheckBoxGetSelected( GUIEditor.checkbox[2]) == true then 
    Timer = setTimer(function() 
    triggerServerEvent("VehicleColor", localPlayer) 
    end, 500, 0) 
    elseif source ==  GUIEditor.checkbox[2] and guiCheckBoxGetSelected( GUIEditor.checkbox[2]) == false then 
    killTimer(Timer) 
    end 
end) 

سيرفر

--#Server 
addEvent("VehicleColor", true) 
addEventHandler("VehicleColor", root, 
function() 
if not isPedInVehicle(source) then 
outputChatBox("[RentSystem]: يجب ان تكون في السيارة اولا", source, 255, 0, 0, true) else 
local vehicle = getPedOccupiedVehicle(source) 
outputChatBox('[RentSystem]: لقد تم تشغيل الأوان العشوائية بنجاح  ', source ,0,255,0,true ) 
setVehicleColor(vehicle, math.random(0,255), math.random(0,255), math.random(0,255)) 
    end 
      end  ) 

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

هنا السهم ما يظهر

-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
if source == GUIEditor.checkbox[3] and guiComboBoxGetSelected(GUIEditor.checkbox[3]) == true then 
triggerServerEvent('Create',localPlayer) 
elseif source == GUIEditor.checkbox[3] and guiComboBoxGetSelected(GUIEditor.checkbox[3]) == false then 
triggerServerEvent('Destroy',localPlayer) 
end 
end 
) 

سيرفر

addEvent('Create',true) 
addEvent('Delete',true) 
  
Object = {  } 
addEventHandler('Create',root, 
function ( thePlayer ) 
    outputChatBox('[RentSystem]: لقد تم اظهار السهم  بنجاح  ', thePlayer ,0 , 255, 0 , true ) 
        local Interior , Dimension , xPosition, yPosition, zPosition = getElementInterior( thePlayer ) , getElementDimension( thePlayer) , getElementPosition( thePlayer ) 
            Object[thePlayer] = createObject(1318,xPosition, yPosition + 10 , zPosition ) 
                setElementInterior( Object[thePlayer] , Interior ) 
                    setElementDimension( Object[thePlayer] , Dimension ) 
                        
end ) 
  
addEventHandler('Delete',root, 
function ( thePlayer ) 
    if ( isElement( Object[thePlayer] ) ) then 
        outputChatBox("[RentSystem]: تم اخفاء السهم بنجاح", thePlayer, 255, 0, 0, true) 
            destroyElement( Object[thePlayer] ) 
end 
            end ) 
  

Link to comment

addEvent('Create',true) 
addEvent('Delete',true) 
  
Object = {  } 
addEventHandler('Create',root, 
function ( source ) 
    outputChatBox('[RentSystem]: لقد تم اظهار السهم  بنجاح  ', source ,0 , 255, 0 , true ) 
        local Interior , Dimension , xPosition, yPosition, zPosition = getElementInterior( source ) , getElementDimension( source) , getElementPosition( source ) 
            Object[source] = createObject(1318,xPosition, yPosition + 10 , zPosition ) 
                setElementInterior( Object[source] , Interior ) 
                    setElementDimension( Object[source] , Dimension ) 
                        
end ) 
  
addEventHandler('Delete',root, 
function ( source ) 
    if ( isElement( Object[source] ) ) then 
        outputChatBox("[RentSystem]: تم اخفاء السهم بنجاح", source, 255, 0, 0, true) 
            destroyElement( Object[source] ) 
end 
            end ) 

--#Server 
addEvent("VehicleColor", true) 
addEventHandler("VehicleColor", root, 
function (   ) 
if not ( isPedInVehicle(source) ) then 
    local vehicle = getPedOccupiedVehicle(source) 
        outputChatBox('[RentSystem]: لقد تم تشغيل الأوان العشوائية بنجاح  ', source ,0,255,0,true ) 
            setVehicleColor(vehicle, math.random(0,255), math.random(0,255), math.random(0,255)) 
else 
outputChatBox("[RentSystem]: يجب ان تكون في السيارة اولا", source, 255, 0, 0, true) 
  
    end 
end  ) 

  
--#Client 
addEventHandler("onClientGUIClick", root, 
function() 
        if ( source ==  GUIEditor.checkbox[2] ) and ( guiCheckBoxGetSelected( GUIEditor.checkbox[2]) == true ) then 
    Timer = setTimer(function( ) triggerServerEvent("VehicleColor", localPlayer) end, 500, 0) 
    elseif ( source ==  GUIEditor.checkbox[2] ) and ( guiCheckBoxGetSelected( GUIEditor.checkbox[2]) == false ) then 
        if isTimer(Timer) then killTimer(Timer) end 
    end 
end ) 

setTimer(function() 
guiSetProperty(GUIEditor.checkbox[1], "NormalTextColour", string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) 
end, 50, 0) 

, جرب ض2

Link to comment

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

تمام كلو اشتغل ما عدا السهم

addEvent('Create',true) 
addEvent('Delete',true) 
  
Object = {  } 
addEventHandler('Create',root, 
function ( source ) 
    outputChatBox('[RentSystem]: لقد تم اظهار السهم  بنجاح  ', source ,0 , 255, 0 , true ) 
        local Interior , Dimension , xPosition, yPosition, zPosition = getElementInterior( source ) , getElementDimension( source) , getElementPosition( source ) 
            Object[source] = createObject(1318,xPosition, yPosition + 10 , zPosition ) 
                setElementInterior( Object[source] , Interior ) 
                    setElementDimension( Object[source] , Dimension ) 
                        
end ) 
  
addEventHandler('Delete',root, 
function ( source ) 
    if ( isElement( Object[source] ) ) then 
        outputChatBox("[RentSystem]: تم اخفاء السهم بنجاح", source, 255, 0, 0, true) 
            destroyElement( Object[source] ) 
end 
            end ) 

-- Client 
addEventHandler('onClientGUIClick',root, 
function () 
if source == GUIEditor.checkbox[3] and guiComboBoxGetSelected(GUIEditor.checkbox[3]) == true then 
triggerServerEvent('Create',localPlayer) 
elseif source == GUIEditor.checkbox[3] and guiComboBoxGetSelected(GUIEditor.checkbox[3]) == false then 
triggerServerEvent('Destroy',localPlayer) 
end 
end 
) 

Link to comment

addEvent('Create',true) 
addEvent('Delete',true) 
  
Object = {  } 
addEventHandler('Create',root, 
function (  ) 
    outputChatBox('[RentSystem]: لقد تم اظهار السهم  بنجاح  ', source ,0 , 255, 0 , true ) 
        local Interior , Dimension , xPosition, yPosition, zPosition = getElementInterior( source ) , getElementDimension( source) , getElementPosition( source ) 
            Object[source] = createObject(1318,xPosition, yPosition + 10 , zPosition ) 
                setElementInterior( Object[source] , Interior ) 
                    setElementDimension( Object[source] , Dimension ) 
                        
end ) 
  
addEventHandler('Delete',root, 
function (  ) 
    if ( isElement( Object[source] ) ) then 
        outputChatBox("[RentSystem]: تم اخفاء السهم بنجاح", source, 255, 0, 0, true) 
            destroyElement( Object[source] ) 
    end 
end ) 
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...