Jump to content

PLEP

Members
  • Posts

    19
  • Joined

  • Last visited

Details

  • Gang
    FBI

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

PLEP's Achievements

Square

Square (6/54)

0

Reputation

  1. PLEP

    Text

    Oh crap.
  2. PLEP

    Text

    By some reason it doesn't work for me I see nothing while in the position 0, 0, 3 or around.
  3. Well, yeah. But I'm trying to find out how all this stuff works with files to get atleast some scripting experience. There are no examples about xml in wiki also. However, now I made another function that would read my file till the end of it and write in another position (Without overwriting the first one). But when I type /mypos in MTA, it causes some excessive error spam in the server window, then I get network troubles. Looks like something's wrong with fileIsEOF and fileRead. I tried everything that would come up in my head, but nothing worked. function consoleAddPos ( thePlayer, command ) local testFile = fileOpen("Positions.txt") if (testFile) then local buffer while not fileIsEOF(testFile) do buffer = fileRead(testFile, 60) local c = getPlayerFromName("PLEP") if c then local x, y, z = getElementPosition (c) if x and y and z then fileWrite(testFile, " ", tostring(x), " ", tostring(y), " ", tostring(z), " ") -- Those " " in the beginning and ending are supposed to be spacebars between positions. fileClose(testFile) end end end end end addCommandHandler ( "mypos", consoleAddPos )
  4. Why would it be better? I need just it to be saved in notepad so I can quickly copy/paste coordinates into script.
  5. Thanks! Works perfectly. Now just left to find out how to add more coordinates in the file instead of overwriting existed over again.
  6. Better get your own ideas and make something fun and intresting instead of copycat Valhalla's script. Eventhough if someone decides to do this for you. You'll just lose money for nothing, because noone will be playing on your server, since there's another just the same server. Plus Venturas is awful city for RP.
  7. Basicly, I'm trying to make a small script that would save my positions in a test.txt, but I can't get getElementPosition to print out as text in the file. Any ideas? function consoleCommandTest ( thePlayer, command ) local newFile = fileCreate("test.txt") if (newFile) then a = getPlayerFromName( "PLEP" ) if a then b = getElementPosition (a) if b then fileWrite(newFile, b) fileClose(newFile) end end end end addCommandHandler ( "mypos", consoleCommandTest )
  8. Thank you! Few pages that already loaded are working perfectly. But it takes hella lot of time to DL MTA wiki: Like 6 hours passed and only 66MiB downloaded
  9. I have very bad internet connection, so checking wiki while scripting is very troublesome. I thought if it's possible to download MTA wiki page fully so that I don't need internet at all to see some functions, ids, etc?
  10. I think 200 hp is the maximum in GTA SA.
  11. PLEP

    [HELP] RPG SERVER

    https://wiki.multitheftauto.com/index.ph ... ntPosition To find out my own coordinates in game I usually do run p = getPlayerFromNick("PLEP") run getElementPosition(p)
  12. PLEP

    Few questions.

    Got a problem here with camera... According to my idea, after player dies and 4 seconds delay passes he will respawn at the certain place (-1951.37, 148.78, 26.28) and facing west (, 90). It works, but camera wouldn't look at west as the ped does. I tried fix this with setCameraMatrix. It actualy looks where I need to, but then I couldn't get back to Ped camera. I tried few variations with setCameraTarget and tried to cancel setCameraMatrix after it's true. Either way, it won't work. Maybe I did something wrong, I dunno. function setCameraOnPlayerSpawn() setTimer( spawnPlayer, 4000, 1, source, -1951.37, 148.78, 26.28, 90 ) deathCam = setCameraMatrix(source, -1984, 210, 37.95, -2024.27, 148.62,28.835) if (deathCam == true) then cancelEvent() end end addEventHandler( "onPlayerWasted", getRootElement(),setCameraOnPlayerSpawn)
  13. PLEP

    Is there

    Anyway cops and robbers is boring like hell.
  14. PLEP

    Few questions.

    Well, yeah. I need the way to assign unique ID number to each player when he joins. That's going to be used mainly for personal messages, commands in run code during test and in game commands which starting with slash ( /giveweapon [iD/PlayerName] [Weapon ID] [Ammo] for example ). IDs should be different so there won't be any mix, when player disconnects his ID could be used by another player who joins the server. And IDs should be automaticaly sorted from first one to last in scoreboard. It's actualy the same thing like in SAMP, those are dynamic. Also I thought of static IDs. So every player gets his unique static ID number that attaches to his account forever. If player joins back on the server, then he will have the same ID like before disconnecting. 13. Hence I would need a system to save accounts data, which would save: static IDs, amount of money, cars and stuff player owns, weapons, houses, business, etcetera. Here's another question: 14. function [u]funcname[/u](args) -- Code end I could give any name I want to funcname or not? 15. How do I set up an arrow near some door and when I steo on it, and actualy press F, then I will get teleported to <interior id="96" name="OG Loc's House" posX="516.8890" posY="-18.4120" posZ="1001.5650" rot="0" world="3" /> and vice versa? If I make 2 or more arrows in different places with same interior id like above, then all players who enters it would teleport to same place? If so, How to avoid this?
×
×
  • Create New...