HITMANzz Posted April 1, 2010 Share Posted April 1, 2010 HELLO i want know where can i get the resources that you can see in this videos: Link to comment
karlis Posted April 1, 2010 Share Posted April 1, 2010 1)no idea 2)private resources for valhalla server Link to comment
Gamesnert Posted April 1, 2010 Share Posted April 1, 2010 1) https://forum.multitheftauto.com/viewtop ... ce#p294825 Link to comment
HITMANzz Posted April 1, 2010 Author Share Posted April 1, 2010 thanks!!! somebody knows where can i get the First Person resource¿? thanks Link to comment
Xierra Posted April 2, 2010 Share Posted April 2, 2010 That one is also Valhalla's private resource. Anyway, you can make yourself and it's client only. Link to comment
HITMANzz Posted April 2, 2010 Author Share Posted April 2, 2010 i have found this (It has been created by Borov, an user of this forum): But i dont know how use it. --global variables g_root = getRootElement() cameraFixed = false --custom functions function toggleCameraFixedModeEx(mode) if (mode == false) then toggleCameraFixedMode(false) cameraFixed = false else toggleCameraFixedMode(true) --setCameraLookAt(2000, 2000, 0) cameraFixed = true end end function getCameraModeEx() return cameraFixed end ---places player camera in front of player every frame isFPS = false function turnCamera(cursorX, cursorY, absoluteX, absoluteY, wX, wY, wZ) if (fpsOff() == true) then toggleCameraFixedModeEx(false) return true elseif (getCameraModeEx() == false) then toggleCameraFixedModeEx(true) end setCameraLookAt(wX, wY, wZ) local player = getLocalPlayer() local x,y,z = getElementPosition(player) local r = 0 local dx = wX-x local dy = wY-y local backing = getControlState("backwards") if (dx < 0 and dy >0) then --II r = math.deg((math.atan((wY-y)/(wX-x))))+180 elseif (dx < 0 and dy < 0) then --III r = math.deg((math.atan((wY-y)/(wX-x))))+180 else --I and IV r = math.deg((math.atan((wY-y)/(wX-x)))) end r = r-90 if (r < 0) then r = r + 360 elseif (r > 360) then r = r - 360 end if (backing == false) then setPlayerRotation(player, r) x = x + 0.4 * math.cos(math.rad(r+90)) y = y + 0.4 * math.sin(math.rad(r+90)) if (isPlayerDucked(player) == false) then setCameraPosition(x, y, z+0.7) else setCameraPosition(x, y, z) end end end addEventHandler("onClientCursorMove", g_root, turnCamera) function moveCamera() if (fpsOff() == true) then toggleCameraFixedModeEx(false) return true elseif (getCameraModeEx() == false) then toggleCameraFixedModeEx(true) end local player = getLocalPlayer() --getting new camera position local x,y,z = getElementPosition(player) local r = getPlayerRotation(player) x = x + 0.4 * math.cos(math.rad(r+90)) y = y + 0.4 * math.sin(math.rad(r+90)) if (isPlayerDucked(player) == false) then setCameraPosition(x, y, z+0.7) else setCameraPosition(x, y, z) end end addEventHandler("onClientRender", g_root, moveCamera) function fpsOff() local player = getLocalPlayer() --if (isPlayerInVehicle(player) == true) then --return false if (getControlState("aim_weapon") == true) then return true elseif (isFPS == false) then return true else return false end end function fixCamera ( command, state) if (state == "on") then toggleCameraFixedModeEx(true) isFPS = true elseif (state == "off") then toggleCameraFixedModeEx(false) isFPS = false end end addCommandHandler("fps", fixCamera) function refixCamera(theVehicle, seat) if (isFPS == "true") then toggleCameraFixedModeEx(true) end end addEventHandler("onClientPlayerVehicleEnter", g_root, refixCamera) https://forum.multitheftauto.com/viewtop ... 91&t=22678 i have tried to put it in my gamemode's client and type the command when im playing in my server, but im not doing it well. help me please Link to comment
Gamesnert Posted April 2, 2010 Share Posted April 2, 2010 That code's ancient. It was designed to work for the DPs, but a lot has changed in 1.0 that broke the script. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now