Jump to content

طلب كود


Mohamed

Recommended Posts

  • Other Languages Moderators
ممكن مثال بسيط

can you give me a script example?

Example:

ped = createPed(0, getElementPosition(localPlayer)) 
  
addEventHandler("onClientRender", root, 
function() 
    local x, y, z = getElementPosition(localPlayer) 
    local tx, ty, tz = getElementPosition(ped) 
    local dis = getDistanceBetweenPoints2D(x, y, tx, ty) 
    if dis > 2 then 
        setPedControlState(ped, "forwards", true) 
    else 
        setPedControlState(ped, "forwards", false) 
    end 
    setPedRotation(ped, findRotation(tx, ty, x, y)) 
end) 
  
function findRotation(x1,y1,x2,y2) 
    local t = -math.deg(math.atan2(x2-x1,y2-y1)) 
    if t < 0 then t = t + 360 end 
    return t 
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...