Jump to content

تعديل كود


Recommended Posts

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

شباب حاولت اسوي ماركر اذا وقف عليك الاعب يعطيه سياره وعندي المود جاهز بس المشكله ان اللي عندي سيرفر

واللي احتاجه الحين كلنت وحاولت اسويه كلنت ماعرفت

هذا الكود

سيرفر

addEvent ( "SOSO", true ) 
addEventHandler ( "SOSO", root, 
function(player) 
     if source == theMarker then 
          if getElementType(player) == "player" and not isPedInVehicle(player) then 
               if isElement(vehicle[player]) then 
                    destroyElement(vehicle[player]) 
                    vehicle[player] = nil 
               end 
               local x, y, z = getElementPosition(player) 
               vehicle[player] = createVehicle(411, x, y, z) 
               warpPedIntoVehicle(player, vehicle[player]) 
          end 
     end 
end) 

هذا ترقر انا ربطته مع الماركر الى الكلنت

كلنت

addEventHandler("onClientMarkerHit", root, 
  
function (hitElement ) 
if getElementType(hitElement) == "player" and (hitElement == localPlayer) then 
triggerServerEvent("SOSO",localPlayer) 
  
end 
    end 
) 

وش الغلط فيه ؟؟؟؟؟؟

Link to comment
addEventHandler("onClientMarkerHit", root, 
function(hitElement) 
    if source == theMarker and getElementType(hitElement) == "player" and (hitElement == localPlayer) then 
        triggerServerEvent("SOSO", localPlayer, localPlayer) 
    end 
end) 

addEvent("SOSO", true) 
addEventHandler("SOSO", root, 
function(player) 
    if getElementType(player) == "player" and not isPedInVehicle(player) then 
        if isElement(vehicle[player]) then 
            destroyElement(vehicle[player]) 
            vehicle[player] = nil 
        end 
        local x, y, z = getElementPosition(player) 
        vehicle[player] = createVehicle(411, x, y, z) 
        warpPedIntoVehicle(player, vehicle[player]) 
     end 
end) 

Link to comment
addEventHandler("onClientMarkerHit", root, 
function(hitElement) 
    if source == theMarker and getElementType(hitElement) == "player" and (hitElement == localPlayer) then 
        triggerServerEvent("SOSO", localPlayer, localPlayer) 
    end 
end) 

addEvent("SOSO", true) 
addEventHandler("SOSO", root, 
function(player) 
    if getElementType(player) == "player" and not isPedInVehicle(player) then 
        if isElement(vehicle[player]) then 
            destroyElement(vehicle[player]) 
            vehicle[player] = nil 
        end 
        local x, y, z = getElementPosition(player) 
        vehicle[player] = createVehicle(411, x, y, z) 
        warpPedIntoVehicle(player, vehicle[player]) 
     end 
end) 

ما ضبط :cry:

Link to comment
addEventHandler("onClientMarkerHit", root, 
function(hitElement) 
    if source == theMarker and getElementType(hitElement) == "player" and (hitElement == localPlayer) then 
        triggerServerEvent("SOSO", localPlayer, localPlayer) 
    end 
end) 

addEvent("SOSO", true) 
addEventHandler("SOSO", root, 
function(player) 
    if getElementType(player) == "player" and not isPedInVehicle(player) then 
        if isElement(vehicle[player]) then 
            destroyElement(vehicle[player]) 
            vehicle[player] = nil 
        end 
        local x, y, z = getElementPosition(player) 
        vehicle[player] = createVehicle(411, x, y, z) 
        warpPedIntoVehicle(player, vehicle[player]) 
     end 
end) 

تابل انت ناسي تحط ببداية السيرفر

vehicle = {}

Link to comment
addEventHandler("onClientMarkerHit", root, 
function(hitElement) 
    if source == theMarker and getElementType(hitElement) == "player" and (hitElement == localPlayer) then 
        triggerServerEvent("SOSO", localPlayer, localPlayer) 
    end 
end) 

addEvent("SOSO", true) 
addEventHandler("SOSO", root, 
function(player) 
    if getElementType(player) == "player" and not isPedInVehicle(player) then 
        if isElement(vehicle[player]) then 
            destroyElement(vehicle[player]) 
            vehicle[player] = nil 
        end 
        local x, y, z = getElementPosition(player) 
        vehicle[player] = createVehicle(411, x, y, z) 
        warpPedIntoVehicle(player, vehicle[player]) 
     end 
end) 

تابل انت ناسي تحط ببداية السيرفر

vehicle = {}

حطيتها ولا صلح

Link to comment

server

  
vehicle = {} 
  
addEvent ( "SOSO", true ) 
addEventHandler ( "SOSO", root, 
    function() 
        if getElementType(source) == "player" and not isPedInVehicle(source) then 
            if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end 
                local x, y, z = getElementPosition(source) 
                vehicle[source] = createVehicle(411, x, y+1, z) 
        if vehicle[source] then 
            warpPedIntoVehicle(source, vehicle[source]) 
        end  
         end 
    end 
) 
  
addEventHandler("onPlayerQuit",root,  
    function()  
    if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end  
end) 
  
  

Link to comment
server
  
vehicle = {} 
  
addEvent ( "SOSO", true ) 
addEventHandler ( "SOSO", root, 
    function() 
        if getElementType(source) == "player" and not isPedInVehicle(source) then 
            if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end 
                local x, y, z = getElementPosition(source) 
                vehicle[source] = createVehicle(411, x, y+1, z) 
        if vehicle[source] then 
            warpPedIntoVehicle(source, vehicle[source]) 
        end  
         end 
    end 
) 
  
addEventHandler("onPlayerQuit",root,  
    function()  
    if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end  
end) 
  
  

ما صلح

Link to comment
server
  
vehicle = {} 
  
addEvent ( "SOSO", true ) 
addEventHandler ( "SOSO", root, 
    function() 
        if getElementType(source) == "player" and not isPedInVehicle(source) then 
            if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end 
                local x, y, z = getElementPosition(source) 
                vehicle[source] = createVehicle(411, x, y+1, z) 
        if vehicle[source] then 
            warpPedIntoVehicle(source, vehicle[source]) 
        end  
         end 
    end 
) 
  
addEventHandler("onPlayerQuit",root,  
    function()  
    if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end  
end) 
  
  

ما صلح

كلنت

addEventHandler("onClientMarkerHit", root, 
function(hitElement) 
    if source == theMarker and getElementType(hitElement) == "player" and (hitElement == localPlayer) then 
        triggerServerEvent("SOSO", localPlayer) 
    end 
end) 
  

جرب

اذا ماضبط

حط الكلنت كامل + السيرفر

او ارسله عالخاص

Link to comment
-- Server Side 
addEvent ( "SOSO", true ) 
addEventHandler ( "SOSO", root, 
    function ( thePlayer ) 
        if not isPedInVehicle ( thePlayer ) then 
            if getElementData ( thePlayer, "theVehicle" ) then 
                destroyElement ( getElementData ( thePlayer, "theVehicle" ) ) 
            end 
            local x, y, z = getElementPosition ( thePlayer ) 
            theVehicle = createVehicle ( 411, x, y, z + 2 ) 
            warpPedIntoVehicle ( thePlayer, theVehicle ) 
            setElementData ( thePlayer, "theVehicle", theVehicle ) 
        end 
    end 
) 
  

Link to comment
-- Server Side 
addEvent ( "SOSO", true ) 
addEventHandler ( "SOSO", root, 
    function ( thePlayer ) 
        if not isPedInVehicle ( thePlayer ) then 
            if getElementData ( thePlayer, "theVehicle" ) then 
                destroyElement ( getElementData ( thePlayer, "theVehicle" ) ) 
            end 
            local x, y, z = getElementPosition ( thePlayer ) 
            theVehicle = createVehicle ( 411, x, y, z + 2 ) 
            warpPedIntoVehicle ( thePlayer, theVehicle ) 
            setElementData ( thePlayer, "theVehicle", theVehicle ) 
        end 
    end 
) 
  

حقك يسوي لاق اذا طلع من الروم ماتنسحب

Link to comment
حقك يسوي لاق اذا طلع من الروم ماتنسحب
  
addEventHandler ( "onPlayerQuit", root, 
    function ( ) 
        if getElementData ( source, "theVehicle" ) then 
            destroyElement ( getElementData ( source, "theVehicle" ) ) 
        end  
    end 
) 
  

ذذ

Edited by Guest
Link to comment
-- Server Side 
addEvent ( "SOSO", true ) 
addEventHandler ( "SOSO", root, 
    function ( thePlayer ) 
        if not isPedInVehicle ( thePlayer ) then 
            if getElementData ( thePlayer, "theVehicle" ) then 
                destroyElement ( getElementData ( thePlayer, "theVehicle" ) ) 
            end 
            local x, y, z = getElementPosition ( thePlayer ) 
            theVehicle = createVehicle ( 411, x, y, z + 2 ) 
            warpPedIntoVehicle ( thePlayer, theVehicle ) 
            setElementData ( thePlayer, "theVehicle", theVehicle ) 
        end 
    end 
) 
  

حقك يسوي لاق اذا طلع من الروم ماتنسحب

سعد وصلك الكود خاص ولا ؟

Link to comment
-- Server Side 
addEvent ( "SOSO", true ) 
addEventHandler ( "SOSO", root, 
    function ( thePlayer ) 
        if not isPedInVehicle ( thePlayer ) then 
            if getElementData ( thePlayer, "theVehicle" ) then 
                destroyElement ( getElementData ( thePlayer, "theVehicle" ) ) 
            end 
            local x, y, z = getElementPosition ( thePlayer ) 
            theVehicle = createVehicle ( 411, x, y, z + 2 ) 
            warpPedIntoVehicle ( thePlayer, theVehicle ) 
            setElementData ( thePlayer, "theVehicle", theVehicle ) 
        end 
    end 
) 
  

حقك يسوي لاق اذا طلع من الروم ماتنسحب

سعد وصلك الكود خاص ولا ؟

اايه وصل ثواني اشوفه وارسله

Link to comment
شيك عالخاص ورد لي خبر

واللللللللللللللللللللللللللللللللللللللله انكككككككككككككك شنب كفؤؤؤؤ

مشكؤؤر ويعطيكم العافية

الله يعطيك العافيه بالخدمه أي وقت

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