Jump to content

Lordkire

Members
  • Posts

    28
  • Joined

  • Last visited

Details

  • Location
    Somewhere between Vice City and San Andreas

Lordkire's Achievements

Advanced Member

Advanced Member (8/54)

0

Reputation

  1. Same problem here. If anyone could give a simple explenation how to solve cause i'm not rly good at linux.
  2. It's because you haven't started a gamemode yet. If you start the Hay resource for example you will be able to play.
  3. hey I have that problem too. But i don't have a clue what gcc is. The DP1 worked fine on the server i'm using, but DP2 gave me this error. How do I set the default thingy?
  4. Lordkire

    Lua Tutorials

    I still get errors with this script WARNING: script.lua: Bad argument @ 'destroyElement' for all the lines that have destroyElement() on it.
  5. Well, my script looks exactly the same as Norby's. [EDIT]: I also got the same errors at lines 24 and 31, so it's something with the destroyelement.
  6. I have edited the script of the first Weelky Tutorial a bit so it works. But it still gives errors when people leave the server. The teleport markers and warp points don't get deleted and after a while it starts to look all verry messy. These are the errors I get: WARNING: script.lua: Bad argument @ 'destroyElement' - Line: 56 WARNING: script.lua: Bad argument @ 'destroyElement' - Line: 57 And this is the script I am using: function Script_onMapLoad () for index, player in getElementsByType ( "player" ) do --For each player in the server, bindKey ( player, "i", "down", modeIO ) --Bind the player's "i" key to the function "modeIO" when the key is pressed end end addEventHandler ( "onMapLoad", getRootElement(), Script_onMapLoad ) --This event tells what happens when the map loads. function Script_onPlayerJoin () bindKey ( source, "i", "down", modeIO ) --Bind the player's "i" key to the function "modeIO" when the key is pressed end addEventHandler ( "onPlayerJoin", getRootElement(), Script_onPlayerJoin ) --This event tells what happens when a player joins. function modeIO ( source, key, keyState ) --This function toggles the cursor on/off if isCursorShowing ( source ) then --If cursor was already showing, showCursor ( source, false ) --then hide it; else --if it wasn't showing, showCursor ( source, true ) --then show it. end end function Script_onPlayerClick ( key, keyState, element, x, y, z ) if keyState == "up" then return end --Don't do anything if he's releasing the button. if key == "left" then --If it's left-click: destroyElement ( getElementData ( source, "teleport" ) ) --Destroy his teleport point, if any local theMarker = createMarker ( x, y, z, "cylinder", 2, 0, 255, 0, 50 ) --Create a cylindric marker setElementData ( theMarker, "type", "teleport" ) --Mark the cylinder as a teleport setElementData ( source, "teleport", theMarker ) --Link the creator to the teleport setElementData ( theMarker, "owner", source ) --Link the teleport to its creator elseif key == "right" then --If it's right-click destroyElement ( getElementData ( source, "destination" ) ) --Destroy his destination point, if any local theMarker = createMarker ( x, y, z+1, "corona", 1, 0, 255, 255, 50 ) --Create a glowing corona setElementData ( theMarker, "type", "destination" ) --Mark the corona as a destination point setElementData ( source, "destination", theMarker ) --Link the creator to the teleport setElementData ( theMarker, "owner", source ) --Link the teleport to its creator elseif key == "middle" then --If it's middle-click setElementPosition ( source, x, y, z+1 ) --Teleport the player to where he clicked. end end addEventHandler ( "onPlayerClick", getRootElement(), Script_onPlayerClick ) --This event tells what happens when a player clicks on the screen with the cursor. function Script_onMarkerHit ( player ) if getElementData ( source, "type" ) == "teleport" then --If the marker is a teleport point, local owner = getElementData ( source, "owner" ) --Get the owner linked to the teleport point. local destination = getElementData ( owner, "destination" ) --Get the destination point linked to the owner. if destination then --If destination point exists, local x, y, z = getElementPosition ( destination ) --Get the destination point's position. setElementPosition ( player, x, y, z ) --Put the player there. end end end addEventHandler ( "onMarkerHit", getRootElement(), Script_onMarkerHit ) --This event tells what happens if a player steps inside a marker. function Script_onPlayerQuit ( reason ) destroyElement ( getElementData ( source, "teleport" ) ) --Destroy his teleport point, if any destroyElement ( getElementData ( source, "destination" ) ) --Destroy his destination point, if any end addEventHandler ( "onPlayerQuit", getRootElement(), Script_onPlayerQuit ) --This event tells what happens if a player disconnects.
  7. lol calm down a bit There is no need for patch, as there is noreal release yet. There is only a preview for gamemode developers to see what they'll be able to make. Just explain your problem clearly and one of the MTA devs will see it and fix it for the actual release.
  8. Lordkire

    Driveby in tank

    When you get in a tank with a driveby weapon (like SMG), you van't use the gun of the tank anymore. You can shoot with the SMG. Then i tried pressing rmd and then i couldn't use SMG or tank gun .
  9. I'm using Vista (yes, I know, I'm ). It does indeed work after restarting the game a few times. Maybe it hasn't got anything to do with this, but when I installed MTA, I had to go in single player first do sturn on the HUD text with money and health etc. on again because it had been turned off for some reason after the installation.
  10. I have this often, when I start MTA I can use the mouse to select a server etc, but then in the game I can't use the mouse anymore to look around. I usually helps to just restart MTA, but sometimes you have to do that two or three times, and that's quite annoying.
  11. The currently released MTA doesn't support lua scripts yet. You'll have to wait for MTA:SA DM to use your lua scripts.
  12. You should make a new topic for that question, it's got nothing to do with this one. But I guess you want to know if it's normal you can't walk in MTA. Yes it is. Currently only the Race version has been released, in which yoou can only drive vehicles. But the MTA team is working hard on the newest version, MTA DM. In that version you will be able to walk and shoot and much more.
  13. What would hapen to these forums if all the comunity would think this way? That's what forums are all about. Don't make a mistake, or you'll get 50 posts telling you you did!
  14. about the Bush-script: It's a failed experiment. They wanted to create a guy that wuld make the world better, but Bush only THINKS he's making the world better...
  15. Is there, or will there come a list of all the events and functions and stuff available in MTA? And if so: where? Thanks.
×
×
  • Create New...