Jump to content

بقالي اسبوعين علي نفس الحال و ما في حدا عاوز يساعد #


Recommended Posts

السلام عليكم و رحمة الله و بركاته

ارجو حدا يساعدني

ايه الخطأ في دول ؟

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

هنا المفروض غير قابلة للانفجار و الكسر

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

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

هنا السهم مش بيظهر خالص

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

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

Edited by Guest
Link to comment

اعتقد المشكله عندك بال

Function

لان على حد علمي يوم تستقبل الترايقر في جانب السيرفر

وتكتب الاحداث ثم الفانكشن ، لازم تحط متغيرات او داتا داخل اقواس الفانكشن

يعني كذا تصير

Function ( وهنا تكتب الكلام ، وعلى حسب خبرتي يا يكون داتا او متغيرات )

Edited by Guest
Link to comment
اعتقد المشكله عندك بال

Function

لان على حد علمي يوم تستقبل الترايقر في جانب السيرفر

وكتب الاحداث ثم الفانكشن ، لازم تحط متغيرات او داتا داخل اقواس الفانكشن

يعني كذا تصير

Function ( وهنا تكتب الكلام ، وعلى حسب خبرتي يا يكون داتا او متغيرات )

وضح !

Link to comment

حماية السياره

addEventHandler('onClientGUIClick',root,function () 
if source == GUIEditor.checkbox[4] then 
triggerServerEvent('VehicleDamageProof',localPlayer) 
end 
end) 

addEvent('VehicleDamageProof',true) 
addEventHandler('VehicleDamageProof',root,function () 
local vehicle = getPedOccupiedVehicle ( source ) 
if vehicle then 
isProof = isVehicleDamageProof(vehicle) 
setVehicleDamageProof(vehicle, not isProof) 
outputChatBox(isProof and "تم حماية السياره من الانفجار" or "تم فك الحمايه") 
end 
end) 
  
Link to comment
حماية السياره

addEventHandler('onClientGUIClick',root,function () 
if source == GUIEditor.checkbox[4] then 
triggerServerEvent('VehicleDamageProof',localPlayer) 
end 
end) 

addEvent('VehicleDamageProof',true) 
addEventHandler('VehicleDamageProof',root,function () 
local vehicle = getPedOccupiedVehicle ( source ) 
if vehicle then 
isProof = isVehicleDamageProof(vehicle) 
setVehicleDamageProof(vehicle, not isProof) 
outputChatBox(isProof and "تم حماية السياره من الانفجار" or "تم فك الحمايه") 
end 
end) 
  

شكرا اخي اشتغل بس الكلام مش بيظهر في الشات

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

هنا في كود السهم السهم بيظهر بس بعيد عن السيارة لما اعمل ازالة التحديد

للشيك بوكس مش بيختفي

و الكلام يتكرر

كلنت

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

سيرفر

--server 
  
Object = {  } 
addEvent('Create', true) 
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 ) 
  
addEvent('Delete', true) 
addEventHandler('Delete',root, 
function (  ) 
    if ( isElement( Object[source] ) ) then 
        outputChatBox("[RentSystem]: تم اخفاء السهم بنجاح", source, 255, 0, 0, true) 
            destroyElement( Object[source] ) 
    end 
end ) 

صورة #

do.php?img=9

Link to comment

Object = {  } 
addEvent('Create', true) 
addEventHandler('Create',root,function (  ) 
local vehicle = getPedOccupiedVehicle ( source ) 
if vehicle then 
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 ) 
attachElementToElement(Object[source],vehicle, 0, 0,1.5) 
end 
end) 
Link to comment
Object = {  } 
addEvent('Create', true) 
addEventHandler('Create',root,function (  ) 
local vehicle = getPedOccupiedVehicle ( source ) 
if vehicle then 
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 ) 
attachElementToElement(Object[source],vehicle, 0, 0,1.5) 
end 
end) 

do.php?img=10

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