Jump to content

اصلاح كود


Mhmd.z

Recommended Posts

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

انا مسوي انه لما الاعب يكتب امر باف8 يخليه يقفز ...

ومو ضابط الكود مدري ليش , ابي اعرف وش الغلط فيه

function jump ( ) 
    setControlState ( localPlayer, "jump", true ) -- force the accelerate key on 
end 
addCommandHandler("co", jump) 

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

انا مسوي انه لما الاعب يكتب امر باف8 يخليه يقفز ...

ومو ضابط الكود مدري ليش , ابي اعرف وش الغلط فيه

function jump ( ) 
    setControlState ( localPlayer, "jump", true ) -- force the accelerate key on 
end 
addCommandHandler("co", jump) 

جرب كود سفاح

او جرب كودي

جايبنه من مود ثاني

function jump ( player ) 
    if ( isPedInVehicle ( player ) and canJump == true ) then 
        if ( isTimer ( flood [ player ] ) ) then return end 
        local vx,vy,vz = getElementVelocity ( getPedOccupiedVehicle ( player ) ) 
        setElementVelocity ( getPedOccupiedVehicle ( player ), vx, vy, vz + 0.4 ) 
        flood [ player ] = setTimer ( function () end, 1500, 1 ) 
    end 
end 
  

Link to comment

جرب كود سفاح

او جرب كودي

جايبنه من مود ثاني

function jump ( player ) 
    if ( isPedInVehicle ( player ) and canJump == true ) then 
        if ( isTimer ( flood [ player ] ) ) then return end 
        local vx,vy,vz = getElementVelocity ( getPedOccupiedVehicle ( player ) ) 
        setElementVelocity ( getPedOccupiedVehicle ( player ), vx, vy, vz + 0.4 ) 
        flood [ player ] = setTimer ( function () end, 1500, 1 ) 
    end 
end 
  

كودكك ماله آي دخل بالي يبيه الرجآل ! / =

كله أخطاء وشكلك نسيت تنسخ وظيفة flood :lol:

Link to comment

طيب واذا بخليه للشخصيه الوهميه ما تضبط ليش؟

server 
  
function makePed( thePlayer ) 
local x, y, z = getElementPosition ( thePlayer ) 
local x1,y1,z1 = getElementRotation ( thePlayer ) 
ped1 = createPed(23, x + 2, y , z) 
local rotX, rotY, rotZ = getElementRotation(thePlayer) 
 setElementRotation(ped1,0,0,rotZ+10,"default",true) 
 speed = getDistanceBetweenPoints3D ( 0, 0, 0, getElementVelocity ( ped1 ) ) 
 if isElement( ped1 ) then 
triggerClientEvent ("trigger", ped1 ) 
end 
end 
addCommandHandler("makemyped", makePed) 

client 
function trigger(ped1) 
    setPedControlState ( ped1, "jump", true ) 
end 
addEvent ( "trigger", true ) 
addEventHandler ( "trigger", root, trigger ) 

Link to comment
-- Server 
function makePed( thePlayer ) 
local x, y, z = getElementPosition ( thePlayer ) 
local x1,y1,z1 = getElementRotation ( thePlayer ) 
ped1 = createPed(23, x + 2, y , z) 
local rotX, rotY, rotZ = getElementRotation(thePlayer) 
 setElementRotation(ped1,0,0,rotZ+10,"default",true) 
 speed = getDistanceBetweenPoints3D ( 0, 0, 0, getElementVelocity ( ped1 ) ) 
 if isElement( ped1 ) then 
triggerClientEvent (thePlayer, "trigger", thePlayer, ped1 ) 
end 
end 
addCommandHandler("makemyped", makePed) 

Link to comment
تقصدني أنا ؟

Server Side ياليت تنتبه أني كاتب بكل وضوح

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

انا مسوي انه لما الاعب يكتب امر باف8 يخليه يقفز ...

ومو ضابط الكود مدري ليش , ابي اعرف وش الغلط فيه

function jump ( ) 
    setControlState ( localPlayer, "jump", true ) -- force the accelerate key on 
end 
addCommandHandler("co", jump) 

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