Jump to content

FPS sensibility


WolfPire

Recommended Posts

so i've been making out an FPS system for vehicles... Thanks to some help i also managed to make it moveable, problem lays in the sensibility, i can't goo to far off the centrer of the screen without it going apesh*t so i was wondering if you bro's out there could lend me a hand that i'd really appreciate :)

Here's the code :3

function VFPS() 
        if isPedInVehicle(localPlayer) then 
        rx,ry,rz = getElementRotation(localPlayer) 
        x,y,z = getPedBonePosition(localPlayer, 7) 
        showCursor(true, false) 
        s1,s2,cx,cy,cz = getCursorPosition(localPlayer) 
        setCameraMatrix(x,y,z,cx,cy,cz,ry,180) 
        setPedLookAt(localPlayerc,cx,cy,cz,-1) 
    else 
        setCameraTarget(g_Me) 
        removeEventHandler("onClientPreRender", root, VFPS) 
        FPS = false 
    end 
end 

(Note: Take it as client pre-render was already handling this, FPS values are to close windows depending on bool's and stuff..)

Thanks in advance, bro's :)

EDIT: Kelp, anyone?

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