Jump to content

Vivalavido

Members
  • Posts

    40
  • Joined

  • Last visited

Everything posted by Vivalavido

  1. function hide () guiSetVisible ( myWindow, false ) showCursor ( false ) end Removed the "btnCls" from your function. Might help.
  2. You have to type /showobject you know? In the chatbox that is.
  3. function loadObjects() myobject = createObject ( 1337, 5540.6654, 1020.55122, 1240.545, 90, 0, 0 ) end addEventHandler("onResourceStart", getRootElement(), loadObjects) function moveObjects() moveObject(myobject, 5000, 2500, 450.5, 15 ) end addCommandHandler("showobject", moveObjects) ¨ Ingame, go to the coordinateds 5540, 1020, 1240
  4. function loadObjects() myobject = createObject( 3117, 2500, 450.5, 9.6 ) end addEventHandler("onResourceStart", getRootElement(), loadObjects) function moveObjects() moveObject(myobject, 5000, 2500, 450.5, 15 ) end addCommandHandler("showobject", moveObjects) There cant be anything wrong with it. Exept that your doing it clientsided, or you just dont know where the object is. I spawned an object on other X,Y,Z´s in my server. With this script. Worked like a charm.
  5. Alright. Lets do it this way then. function loadObjects() myobject = createObject( 3117, 2500, 450.5, 9.6 ) end addEventHandler("onResourceStart", getRootElement(), loadObjects) function moveObjects() moveObject ( myobject, 5000, 2500, 450.5, 15 ) end addCommandHandler("showobject", moveObjects)
  6. Vivalavido

    XML Help

    Try: function getcar ( source ) local name = getPlayerNametagText(source) local xmlFile=xmlLoadFile("xmlfile.xml") if xmlFile then --If it's indeed opened: local node=xmlFindSubNode(xmlFile,"somesubnode",0) local success=xmlNodeGetValue(node) if success then outputChatBox(tostring(success)) end end outputChatBox( "done", source ) warpPlayerIntoVehicle ( source, success ) end addCommandHandler("getcar", getcar)
  7. function createAndShowObject() myobject = createObject( 3117, 2500, 450.5, 9.6 ) moveObject ( myobject, 5000, 2500, 450.5, 15 ) end addCommandHandler("showobject", createAndShowObject) This will move the object up. (Takes 5 seconds, as you can see, moveObject( myObject, 5000ms <--- ))
  8. Lol, your doing the createObject in the function now? function createAndShowObject() myobject = createObject( 3117, 2500, 450.5, 9.6 ) moveObject ( myobject, 5000, x, y, -2 / +2 ) end addCommandHandler("showobject", createAndShowObject) Try that
  9. Welll, basicly. I want to warp a player into a vehicle instantly by typing a command. But all my try's are fails.
  10. Hey guys, ive been trying to warp a player instantly in a car when he does a command Ive looked at the tutorial on the wiki function createstartvehicles ( playerSource, commandName, car, x, y, z ) -- the function allows specification of your car, and the position local racevehicle = createVehicle ( car, x, y, z ) -- create a vehicle at the position specified by the startrace command warpPlayerIntoVehicle ( playerSource, racevehicle ) -- warp them straight into the vehicle end addCommandHandler ( "startrace", createstartvehicles ) -- add a command to start race It also states at above: This function is deprecated. This means it does not exist any more but there should be an alternative (usually more generic) way of performing what it once did. Ive tried the script, get a bad argument @ createVehicle AND warpPlayerIntoVehicle. Are there alternatives off warping a player into a vehicle by command?
  11. Pleas mate, learn some LUA. Plus try to use the search function wich they implented here. Lol. https://forum.multitheftauto.com/viewtopic.php?f=91&t=19037
  12. http://development.mtasa.com/index.php?title=Vehicle_IDs#Trains http://development.mtasa.com/index.php?title=CreateVehicle
  13. <meta> <script src="filename.lua" type="client" /> </meta>
  14. Okay, im creating a bomb script, with the function setTimer(), but, its not stable at all, it sometimes activates it 4 times in a row setTimer ( bombtehtower, 6000*10, 0 ) is what I use, it keeps itself to the time, but it activates it too much in a row sometimes, how to stablize it?
×
×
  • Create New...