Jump to content

niemi

Members
  • Content Count

    20
  • Joined

  • Last visited

Community Reputation

0 Neutral

About niemi

  • Rank
    Civilian
  1. Thx, it works, but it gets too close, if i'm trying to do this: function pickup(player) local x,y,z = getElementPosition(player) local ang = getPlayerRotation(player) createPickup(x+math.sin(math.rad(-ang)), y+math.cos(math.rad(-ang)), z, 0, 100) end addCommandHandler( "heal", pickup ) If i spawn it, it spawn it in front of me, but too close, because no one else can take it, because i take it automatically because it's too close, how can i get it a bit farther?
  2. Okay, i want to spawn an object in front of a player, how can i do that? If i try this: function spawnObj( source ) local x,y,z = getElementPosition( source ) createObject( 3267, x + 5, y, z ) end addCommandHandler( "samsite", spawnObj ) Sometimes it spawn the object next to him, not front, how can i do it?
  3. niemi

    Pickup help

    Why doesn't this work? function pickup(source) local x,y,z = getElementPosition(source) createPickup(x + 5, y, z, 0, 1240) end addCommandHandler( "heal", pickup ) ' No errors in console or in debugscript 3...
  4. niemi

    Nightly builds help

    I downloaded it, installed, everything went fine, then i started server, and when im in the server I can't play, because im on the air and I just see some clouds, and if i start broph, nothing happens, if i start freeroam and i press f1 then map, and choose some location so spawn, screen just go black. I need some help with this, please. Thx
  5. Why doesn't this work: function createWindow( ) myWindow = Window:Create( 0.02, 0.3, 0.6, 0.6, "Test", true ); btnCls = myWindow:AddButton ( 0.1, 0.9, 0.2, 0.05, "Close", true ); myWindow:Visible ( true ); myWindow:Movable ( false ); myWindow:Sizable ( false ); showCursor( true ); btnCls:AddOnClick( hide ); img = StaticImage:Create( 0.3, 0.4, 0.3, 0.3, "image.png", false, myWindow ); end addEventHandler( "onPlayerJoin", getResourceRootElement( getThisResource() ), createWindow ); addEventHandler( "onClientResourceStart", getResourceRootElement( get
  6. I need help with vehicle godmode, I found an example from the forums that makes player godmode: function damag(attacker, weapon, bodypart) cancelEvent() end addEventHandler("onClientPlayerDamage", getLocalPlayer(), damag) But i can't make it work for vehicles, I tried this: function damag(attacker, weapon) cancelEvent() end addEventHandler("onVehicleDamage", getRootElement(), damag) It doesn't work. I'm just beginning lua scripting, but i can't get that work.
  7. niemi

    Gui help!

    It give the same error still.
  8. niemi

    Gui help!

    function createExplosion ( source, commandName ) local pX, pY, pZ = getElementPosition ( source ) createExplosion ( pX + 5, pY + 5, pZ, 6 ) setTimer ( createExplosion, 1000, 1 ) end addCommandHandler ( "ce", createExplosion, getRootElement(), source ) This is the error i get: [23:10:47] WARNING: lol.lua: Bad argument @ 'getElementPosition' - Line: 3 [23:10:47] ERROR: ...erver/mods/deathmatch/resources/NiemisGM/lol.lua:4: attempt to perform arithmetic on local 'pX' (a boolean value) if i take those +5 off, like this: function createExplosion ( source, commandName
  9. niemi

    Gui help!

    Thanks, that works.
  10. niemi

    Gui help!

    Why this isn't working? I got no errors but the gui doesnt exist. when i type /gui nothing happens, i don't get any errors. In /debugscript 3 or in serverconsole. function createWindow ( thePlayer ) guiCreateWindow(45,85,630,492,"test",false) guiCreateEdit(0.0444,0.065,0.9302,0.9065,"",true) end addCommandHandler ( "gui", createWindow, thePlayer ) And here is meta.xml... <meta> <info author="Niemi" type="script" name="gui" description="sssa" /> <script src="gui.lua" type="client" /> </meta>
  11. You have to add this text on server\mods\deathmatch\mtaserver.conf This: scroll the text down and there is these so add that So the text in down must look like that
  12. okay.. http://mta.pastebin.com/m683c5cde
  13. Oh, okay, thanks, i can get it to the server now, but, i don't know how to use, in the ion.lua script has this in the file : bindKey ( v, "f", "down", "placeIonCannonBeacon" ) but i cant get it work on f or v, and i don't know how to use it, does it matters if the server console says this : [16:49:05] Starting ion [16:49:05] WARNING: ion.lua: Bad argument @ 'addEventHandler' - Line: 14 [16:49:05] WARNING: ion.lua: Bad argument @ 'addEventHandler' - Line: 24 [16:49:05] WARNING: ion.lua: Bad argument @ 'addEventHandler' - Line: 59 but does the ion cannon works if server give those errors?
×
×
  • Create New...