Jump to content

SWEMike

Members
  • Posts

    8
  • Joined

  • Last visited

Details

  • Gang
    Police

SWEMike's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. Okay, it works now. Thank you very much! Oh, and sorry about the edit thing, I'll use it next time.
  2. [21:34:01] WARNING: rp\server\army.lua:15: Bad argument @ 'getObjectRotation' [21:34:01] WARNING: rp\server\army.lua:16: Bad argument @ 'getObjectRotation' [21:34:04] WARNING: rp\server\army.lua:15: Bad argument @ 'getObjectRotation' [21:34:04] WARNING: rp\server\army.lua:16: Bad argument @ 'getObjectRotation' [21:34:06] WARNING: rp\server\army.lua:7: Bad argument @ 'getObjectRotation' [21:34:06] WARNING: rp\server\army.lua:8: Bad argument @ 'getObjectRotation' [21:34:09] WARNING: rp\server\army.lua:7: Bad argument @ 'getObjectRotation' [21:34:09] WARNING: rp\server\army.lua:8: Bad argument @ 'getObjectRotation' I don't think LUA likes me too much.
  3. Okay, thanks! I'll try it right away.
  4. If I wait a few seconds nothing happens. And sure, I'll give ya the map.
  5. [19:59:43] INFO: player Michael_Sund wants to open bar [19:59:43] INFO: current bar rotation: 90 [19:59:43] INFO: moving bar: [19:59:43] INFO: true [19:59:48] INFO: player Michael_Sund wants to close bar [19:59:48] INFO: current bar rotation: 90 [19:59:50] INFO: player Michael_Sund wants to close bar [19:59:50] INFO: current bar rotation: 0 [19:59:50] INFO: moving bar: [19:59:50] INFO: true [19:59:56] INFO: player Michael_Sund wants to open bar [19:59:56] INFO: current bar rotation: 0 I don't get it! D:
  6. SWEMike

    I'm back!

    Nah, wasn't too known. ^^ I don't remember you either!
  7. function onResourceStart ( name, root ) vehBar = getElementByID ( "vehbar" ) origX, origY, origZ = getElementPosition ( vehBar ) end function closeVehicleBar ( playerSource, commandName ) local preX, preY, preZ = getObjectRotation( vehBar ) if preY == 0.0 then local rotY = 90.0 moveObject ( vehBar, 4000, origX, origY, origZ, 0.0, rotY, 0.0 ) end end function openVehicleBar ( playerSource, commandName ) local preX, preY, preZ = getObjectRotation( vehBar ) if preY == 90.0 then local rotY = -90.0 moveObject ( vehBar, 4000, origX, origY, origZ, 0.0, rotY, 0.0 ) end end addEventHandler ( "onResourceStart", getRootElement(), onResourceStart ) addCommandHandler ( "closebar", closeVehicleBar ) addCommandHandler ( "openbar", openVehicleBar ) Can anyone tell me why I have to write the commands two times everytime I want to use it to make it work? Explanation: I go ingame, write /openbar, ntohing happens, I write /openbar again, it works. I then want to close it, I use the command /closebar, ntohing happens, I do it again there it goes down. I have tested it lots of times it always works on the second use of the commands, and yes, I even tried waiting a few seconds after that it closed/opened all the way, still the same result.
  8. SWEMike

    I'm back!

    Hey, all! Many will probably not remember me But anyways I'm Michael Sund and I used to hang around here before but then my PC broke down and I couldn't fix it for a year or so but I got it running a few months ago. I remember some people that helped me learning LUA for MTA but not sure if they would remember me. The two guys I remember at the moment are 50p and that Scarface guy. Anyway, now I have to relearn a lot of stuff and I'm still overwhelmed of all those new cool MTA features and I can't wait til I'm done with the base on my RP gm so I can start scripting the fun stuff. Anyway that's all for now I'll probably hang around the scripting section to try and help people while I myself am learning more scripting. So, see ya on the forums.
×
×
  • Create New...