Jump to content

rjcnz333

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by rjcnz333

  1. When I try to install MTA under wine on the step when i need to enter my account data I receive the message: "Your computer is already associated with another account. Please login using the account that was already registered", so I can't install MTA. Is it possible to install MTA under WINE?
  2. I need to fix the camera. I have made everything as in an example, but the camera isn't fixed setCameraMode(playerid, "fixed") setTimer (setCameraPosition, 1000, 1, playerid, 1984.4445, 160.9501, 55.9384) setTimer (setCameraLookAt, 1000, 1, playerid, 1984.4445, 157.9501, 55.9384)
  3. You don't need to create any files. Just unzip this resource.
  4. Write /pos to save your current position in pos.txt
  5. <meta> <info name="savePos" description="Save your current position" author="333"/> <script src="savepos.lua"/> </meta> You can use this resource only in folder. MTA: DM dp1 doesnt support fileCreate for zipped resources.
  6. What about binds? When I have tried to bind C on ramp, my client crashed.
  7. Ok, and this is my version of the script, that saves your current position. I think, that it is better to keep all positions in one file. function savePos(thePlayer,command,comment) local x, y, z = getElementPosition(thePlayer) hFile = fileOpen("pos.txt", false) if hFile then local temp while not fileIsEOF(hFile) do temp = fileRead(hFile, 500) end fileWrite(hFile,x .. ',' .. y .. ',' .. z .. ',' .. comment .. '\n') else hFile = fileCreate("pos.txt") fileWrite(hFile,x .. ',' .. y .. ',' .. z .. ',' .. comment .. '\n') end outputChatBox("Saved!", thePlayer) fileClose(hFile) end addCommandHandler ("pos", savePos)
  8. I have tried it. It works only when I'm not in a vehicle. When I'm in a vehicle, it spawns ramps with the static rotation, and it depends on the rotation what I have, when I entered the car. So, if I turn, and then spawn the ramp, I can't jump, because the rotation is wrong. This script is fully working: ffunction createRamp ( player, command ) local x, y, z = getElementPosition ( player ) local theVehicle = getPlayerOccupiedVehicle ( player ) local a,b,r = getVehicleRotation ( theVehicle ) x = x - math.sin ( math.rad(r) ) * 20 y = y + math.cos ( math.rad(r) ) * 20 ramp = createObject ( 1655, x, y, z, 0, 0, r ) setTimer ( RemoveRamp, 8000, 1 ) end function RemoveRamp () destroyElement(ramp) end addCommandHandler ( "r", createRamp )
  9. GetPlayerRotation doesn't work when player is in a vehicle. We need something else.
  10. Ok, and why so difficult? Just function createRamp ( player, command ) local x, y, z = getElementPosition ( player ) local r = getPlayerRotation ( player ) x = x + math.cos(r) * 10 y = y + math.sin(r) * 10 createObject ( 1655, x, y, z, 0, 0, -r ) end addCommandHandler ( "ramp", createRamp ) Damn. Something goes wrong in my script(
  11. Later you need to createObject, and destroyElement (your object) after some seconds.
  12. niemi, you need to load some gamemode! Just write '/votemode' and select one of them, or login as admin, and write in console 'gamemode [mode] [map]'
  13. I have written a simple script: local hFile = fileOpen("pos.txt", false) -- open the file if hFile then -- check if it was successfully opened writePos(thePlayer, comment) else hFile = fileCreate("pos.txt") -- create a new file writePos(thePlayer, comment) end Then I have tried it and received: Why it doesn't create a new file?
  14. I'm running MTA: DM server on Ubuntu, and server crashes 3-5 times in day. In logs I don't see any errors, but the time of the last chat message is wrong.
  15. How to remote restart or shut down my server?
  16. rjcnz333

    Help Errors

    I tried this example from wiki: function printLevel ( thePlayer ) outputChatBox ( getClientName ( thePlayer ) .. "'s level is: " .. getClientLevel ( thePlayer ) ) end addCommandHandler ( "level", printLevel ) And get this:
  17. IMHO, MTA needs possibility to minimize and to skip movies. It's really annoying to close the game, rewrite one or two lines in the script, and then wait while the game will be loaded. Also, cyrillics support would be very useful. Sorry 4 bad English =)
  18. Yes, it is very boring to debug scripts when you can't minimize the game
  19. Use getRealTime function showtime () local time = getRealTime() local hours = time.hour local minutes = time.minute outputChatBox ( "Local Time: "..hours..":"..minutes ) end
  20. When the car turns to a harvester, it jams in the earth
×
×
  • Create New...