Jump to content

Borov

Members
  • Posts

    97
  • Joined

  • Last visited

Everything posted by Borov

  1. I don't think it's working
  2. I don't think it's working
  3. you can, but it'll be a lot of trouble to make it work because the functions don't work the same way. I think if you know the pawn script really well, you can do it.
  4. you can, but it'll be a lot of trouble to make it work because the functions don't work the same way. I think if you know the pawn script really well, you can do it.
  5. http://development.mtasa.com/index.php?title=Main_Page
  6. http://development.mtasa.com/index.php?title=Main_Page
  7. brophy: but they don't know the solution to 1st one until they come here and ask and get responded. but they all know tab+alt
  8. brophy: but they don't know the solution to 1st one until they come here and ask and get responded. but they all know tab+alt
  9. max passenger is defined by GTA SA and cannot be modded with script. as far as tricking goes, you can attach the player to the vehicle element and he wont' fall off.
  10. max passenger is defined by GTA SA and cannot be modded with script. as far as tricking goes, you can attach the player to the vehicle element and he wont' fall off.
  11. why do you have 2 markers
  12. sorry don't have any... just try it when you get a chance. I can't wait to see how people may improve it
  13. please report any problem or suggestions if you have tried it ^^
  14. set the Multi Theft Auto.exe's compatibility mode to windows NT
  15. no gta4 doesn't have scripting ability. either it doesn't, or until someone reverse engineer the server and make one like mtadm or samp
  16. So, I always wanted to try making GTA first person view, just for the heck of it. The code below can be inserted into your client side script, and to use it, you go in the game and use the command "/fps on" and "/fps off" to toggle the view. You can run around the map in first person view mode, and of course you'll be able to see your hands and feet. I'm not able to implement first person driving and targeting, due to certain limitations, but perhaps in later releases we can do that. also try ducking, and you'll see the camera lowers as well. Please feel free to expand on it so it becomes more fun. EDIT: now you can see from the driver's view when you sit in a car. if it doesn't work, just hold aim button and release. --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)
  17. he turned firewall off and it works now.
  18. if GTA4 has scripting ability which surpasses the power you get in MTADM then yes I'd switch to that. but unfortunately. oh and the multiplayer mode in gta4 can get old fast. also GTA4 is not GTA any more, it's Mafia in Liberty City
  19. Original post: I don't know whether it's possible, but it would be cool if mouse axis movement can generate events like onClientCursorMove when the cursor is not shown. it can be used to create first person view effect for the player, while the controls are still available New post: I cannot find a way to control a player's targeting direction, in other words, when the player holds right mouse button, we can change the direction it's aiming at. I need this functionality so that when the player is targeting and the cam is fixed, I can let the player aim according to cursor movement. Also, if this function is available, I can randomly move the targeting direction to simulate recoil.
  20. that might be a problem cuz when the cursor shows the controls don't work would be better if mouse movement can be trapped just like other key controls
×
×
  • Create New...