Jump to content

xbenny2506x

Members
  • Posts

    98
  • Joined

  • Last visited

Everything posted by xbenny2506x

  1. I have test this: function leaveplayer () for i,vehicle in ipairs(getElementsByType("vehicle")) do toggleVehicleRespawn(vehicle, true) setVehicleIdleRespawnDelay(vehicle, 10000) end end addEventHandler("onPlayerQuit", getRootElement(), leaveplayer ) onPlayerQuit when the player leave the server but nothing When the player is in a vehicle and leave then the server the vehicle didn't respawn on the old .map place. Can someone help me with that problem PLZ!
  2. i have found a way for all where want the same like me Here is the file: http://www.file-upload.net/download-174 ... t.zip.html
  3. Hi I have a new problem nothing new for me lol When a player leave the server and he is a vehicle the vehicle dont respawn back on the .map place. Here are my idle script: function idleRespawn () for i,vehicle in ipairs(getElementsByType("vehicle")) do toggleVehicleRespawn(vehicle, true) setVehicleIdleRespawnDelay(vehicle, 20000) end end addEventHandler("onResourceStart", getRootElement(), idleRespawn ) i have a vehicle explode script too addEventHandler( "onVehicleExplode", getRootElement( ), function( ) local parent = getElementParent( source ) if getElementType( parent ) == "map" and getElementID( parent ) ~= "dynamic" then setTimer( respawnVehicle, 80000, 1, source ) else setTimer( destroyElement, 5000, 1, source ) end end ) All scripts work very good only when a player is in a vehicle and leave the sever the vehicle dont respawn on the old .map place. Can someone help me plz THX
  4. I have download this Stunt script: https://community.multitheftauto.com/index.php?p=resources&s=details&id=53 First i have a error but the script work!? This is the error: [14:08:09] ERROR: Couldn't packetize argument list, invalid element specified. I am the only one where have this error? And is there a way that the player gets money when he do a stunt?? BTW here is for 3-5h hours my beta server 88.152.95.43:22004
  5. Here is my Server 88.152.95.43:22004 It is only a beta test for 3-5h, so that i can see errors and more On the server i have add stunt maps, games, and some litte scripts. Have fun
  6. work THX for your help!!!!!!!!!
  7. Hi I have a Auto- Chat text script: function delayedChat ( text ) outputChatBox ( "I N F O: " .. text, 0, 255, 0 ) end setTimer ( delayedChat, 240000, 0, "Press F1 for see the Spawn Menu! And F1 for close the Menu!" ) setTimer ( delayedChat, 400000, 0, "Use /fix or R for Repair your Vehicle" ) setTimer ( delayedChat, 690000, 0, "Use /flip or M for Flip your Vehicle" ) And i want that the text is not in the normal white. I have test with 0, 255, 0 but the text is in the chat window all the time white. Why??
  8. yes i found the same problem lol and i have fix it and now the script work very good
  9. your ideas help me lol I have found other errors and now work the script! THX for your ideas
  10. OK i have understand what you mean And i have now: Server side: addEvent( "YOUR_CUSTOM_EVENT", true ); addEventHandler( "YOUR_CUSTOM_EVENT", getRootElement( ), function( locationName ) if LOCATIONS[ locationName ] then local veh = getPlayerOccupiedVehicle( client ); if ( ( veh ) and ( client == getVehicleOccupant( veh ) ) then setVehicleFrozen(veh, true) setElementPosition( veh, unpack( LOCATIONS[ locationName ] ) ); setTimer(setVehicleFrozen, 200, 1, veh, false) else setElementPosition( client, unpack( LOCATIONS[ locatioName ] ) ); end end end ) But i get a error from the server and the script dont work This is the error: [17:58:27] ERROR: Client triggered serverside event YOUR_CUSTOM_EVENT, but event is not added serverside Client: ... function teleportTo( ) triggerServerEvent( "YOUR_CUSTOM_EVENT", getLocalPlayer( ), guiGetText( source ) ); end bindKey( "F1", "down", function () showCursor( not isCursorShowing() ) end )
  11. The server send me a error when i use my script... its work very good but the server send me the error [22:37:21] WARNING: menu_server.lua: Bad argument @ 'setVehicleFrozen' - Line: 21 and this is my script: LOCATIONS[ "Halfpipe" ] = { 2857.1716308594, -1961.9986572266, 11.400349617004 }; addEvent( "YOUR_CUSTOM_EVENT", true ); addEventHandler( "YOUR_CUSTOM_EVENT", getRootElement( ), function( locationName ) if LOCATIONS[ locationName ] then local veh = getPlayerOccupiedVehicle( client ); setVehicleFrozen(veh, true) setElementPosition( ( ( veh and getVehicleOccupant( veh ) == client) and veh or client ), unpack( LOCATIONS[ locationName ] ) ); setTimer(setVehicleFrozen, 200, 1, veh, false) end end ) When i teleport with a bike i fall og from the bike, is there a way for add a antibike-fall-off for some secs too? I know that i say all the time thx but im happy for all this help here so THX for the help!
  12. BIG THX for the help!!!!!!!! I have use this: setTimer(setVehicleFrozen, 200, 1, vehicle, false) -- Time not under 200 or the vehicle teleport problem comes back I have use setTime so that when the vehicle is Frozen on the spawn point not in the same time the vehicle unfrozen. Without setTime the crazy Vehicle teleport problem comes back and the time not under 200!
  13. i have now: function hjwarp (player) if isPlayerInVehicle(player) then -- If the player is in a vehicle... local vehicle=getPlayerOccupiedVehicle(player) -- Obtain the vehicle the player is in if getVehicleController(vehicle)==player then -- If the player is the driver... setVehicleFrozen(vehicle, true) setElementPosition (vehicle , 886.24, 2479.17, 261.32 ) -- Warp the vehicle outputChatBox ( "You're warped to High Jump /hj!", player, 0, 255, 0 ) end else -- If the player isn't in a vehicle... setElementPosition (player , 886.24, 2479.17, 261.32 ) -- Warp the player outputChatBox ( "You're warped to High Jump /hj!", player, 0, 255, 0 ) end end addCommandHandler ( "hj", hjwarp ) and addEvent( "YOUR_CUSTOM_EVENT", true ); addEventHandler( "YOUR_CUSTOM_EVENT", getRootElement( ), function( locationName ) if LOCATIONS[ locationName ] then local veh = getPlayerOccupiedVehicle( client ); setVehicleFrozen(veh, true) setElementPosition( ( ( veh and getVehicleOccupant( veh ) == client) and veh or client ), unpack( LOCATIONS[ locationName ] ) ); end end ) but how i unfreeze the vehicle?
  14. I have a problem with my Vehicle teleport, when the player teleport with a vehicle its fly in the sky and make many 360° rotation. First i thought the teleport points are not good and i add some for a test in the sky but the same problem the vehicle goes from 0 to ~250km and make many rotation This are my teleport scripts: For the chat teleport is use this one: function hjwarp (player) if isPlayerInVehicle(player) then -- If the player is in a vehicle... local vehicle=getPlayerOccupiedVehicle(player) -- Obtain the vehicle the player is in if getVehicleController(vehicle)==player then -- If the player is the driver... setElementPosition (vehicle , 886.24, 2479.17, 261.32 ) -- Warp the vehicle outputChatBox ( "You're warped to High Jump /hj!", player, 0, 255, 0 ) end else -- If the player isn't in a vehicle... setElementPosition (player , 886.24, 2479.17, 261.32 ) -- Warp the player outputChatBox ( "You're warped to High Jump /hj!", player, 0, 255, 0 ) end end addCommandHandler ( "hj", hjwarp ) and this is my menu teleport server side: LOCATIONS = { }; -- Add your locations here, -- text between [ and ] MUST be the same as on the buttons -- because client will send text from the buttons: LOCATIONS[ "Huge Jump" ] = { 886.24, 2479.17, 261.32 }; LOCATIONS[ "Water Jump" ] = { 2339.720703125, -161.08451843262, 181.44232177734 }; LOCATIONS[ "Airport Jump" ] = { -92.949096679688, 1445.4046630859, 1101.4439697266 }; LOCATIONS[ "Super Jump" ] = { -162.94660949707, 1781.0217285156, 674.16528320313 }; LOCATIONS[ "Beach Jump" ] = { 827.25946044922, -3171.4382324219, 595.85174560547 }; LOCATIONS[ "Looping" ] = { 1696.9108886719, -1257.9813232422, 363.45672607422 }; LOCATIONS[ "Las Venturas Jump" ] = { 2067.7434082031, 2382.5844726563, 482.86682128906 }; LOCATIONS[ "Las Venturas Airport" ] = { 1886.8115234375, -2455.1220703125, 16.459857940674 }; addEvent( "YOUR_CUSTOM_EVENT", true ); addEventHandler( "YOUR_CUSTOM_EVENT", getRootElement( ), function( locationName ) if LOCATIONS[ locationName ] then local veh = getPlayerOccupiedVehicle( client ); setElementPosition( ( ( veh and getVehicleOccupant( veh ) == client) and veh or client ), unpack( LOCATIONS[ locationName ] ) ); end end ) I hope someone can say me why and how i can fix this problem THX for this help and BIG THX for all the other help post!!!! Very nice people here!!! THX
  15. 127.0.0.1:22128 this is you local ip use this page and post your new server ip http://whatismyipaddress.com/
  16. BIG BIG BIG THX!!! I had a little error but i fix it! My last question is, when i start the menu, how i start the mouse cursor so that the people can use the button? BIG BIG THX for the help!!!!!
  17. omg you are nice my hero the script work when the player is in a vehicle but not when he is not in a vehicle Can you help me there too?? the menu start when the player join is there a way that the menu start when the player press "F1"? i hope you can help me with that too!!!! BIG BIG BIG THX!!!! Here is the error code: [00:05:09] WARNING: menu_server.lua: Bad argument @ 'getVehicleOccupant' - Line: 13 [00:05:13] WARNING: menu_server.lua: Bad argument @ 'getVehicleOccupant' - Line: 13 [00:05:13] WARNING: menu_server.lua: Bad argument @ 'getVehicleOccupant' - Line: 13 [00:05:13] WARNING: menu_server.lua: Bad argument @ 'getVehicleOccupant' - Line: 13 [00:05:37] WARNING: menu_server.lua: Bad argument @ 'getVehicleOccupant' - Line: 13 [00:05:50] WARNING: menu_server.lua: Bad argument @ 'getVehicleOccupant' - Line: 13 [00:06:19] QUIT: Benny left the game [Quit]
  18. I have make with the "Guieditor" a nice menu But now i need help, i have the code for the menu: GUIEditor_Window = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(509,297,437,286,"Teleport Menu",false) GUIEditor_Grid[1] = guiCreateGridList(0.0503,0.1678,0.4096,0.7378,true,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) for i = 1, 2 do guiGridListAddRow(GUIEditor_Grid[1]) end guiGridListAddColumn(GUIEditor_Grid[1],"Jumps",0.2) GUIEditor_Grid[2] = guiCreateGridList(0.5217,0.1713,0.4096,0.7378,true,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[2],2) for i = 1, 2 do guiGridListAddRow(GUIEditor_Grid[2]) end guiGridListAddColumn(GUIEditor_Grid[2],"Others",0.2) I work hard on a nice stunt server, i have a lot nice maps, many teleport points so i have create this menu. So that the player see all teleport points and when he click on it, he teleport to this point. For that i have a very nice script that work only with commands in the chat, but i have so many that i need a menu. Here is the teleport script atm: function hjwarp (player) if isPlayerInVehicle(player) then -- If the player is in a vehicle... local vehicle=getPlayerOccupiedVehicle(player) -- Obtain the vehicle the player is in if getVehicleController(vehicle)==player then -- If the player is the driver... setElementPosition (vehicle , 886.24, 2479.17, 258.32 ) -- Warp the vehicle outputChatBox ( "You're warped to High Jump hj!", player, 0, 255, 0 ) end else -- If the player isn't in a vehicle... setElementPosition (player , 886.24, 2479.17, 258.32 ) -- Warp the player outputChatBox ( "You're warped to High Jump hj!", player, 0, 255, 0 ) end end addCommandHandler ( "hj", hjwarp ) A menu is better and easier as all the time the /commands... With F1 the ülayer can start the menu... I dont know how i can do this all Its the last thing for my server since many days i read and read but i need now help with this last thing for my server! I hope somone can help me with the menu 1000000 THX
  19. i use this teamwars file http://www.file-upload.net/download-169 ... s.zip.html i hope someone can say me now i can chage the radar thing plz
  20. Hi! In the mode tw-cp-city with the other files "tw_default" "teamwars" i see only my team on the radar. Is there a way that i can see ALL teams and player on the radar and not only my own team?? I hope! THX for the help!!!!
  21. Work in MTA 1.0 the stunt bonus tune, paint, weapon shops special objects move now (chicken head....) garage doors now open and close (airports...) now???
  22. I have one problem with the editor, when i save a map and load then the map the last object what i have add is not more on the old place. The problem is only sometimes...
  23. I have make a script for all where search the same like me function moveGate () local gate1 = getElementByID ( "turtle" ) local x1, y1, z1 = getElementData ( gate1, "posX" ), getElementData ( gate1, "posY" ), getElementData ( gate1, "posZ" ) moveObject(gate1, 10000, -2233.7536621094, 2318.2541503906, 7.546875 ) end setTimer ( moveGate, 20000, 0 ) addCommandHandler("setTimer", moveGate) addEventHandler("onResourceStart", getRootElement(), moveGate) function moveGateone () local gate1 = getElementByID ( "turtle" ) local x1, y1, z1 = getElementData ( gate1, "posX" ), getElementData ( gate1, "posY" ), getElementData ( gate1, "posZ" ) moveObject(gate1, 10000, -2225.376953125, 2333.6584472656, 7.546875 ) end setTimer ( moveGateone, 40000, 0 ) addCommandHandler("setTimer", moveGateone) addEventHandler("onResourceStart", getRootElement(), moveGateone) .map code <object id="turtle" dimension="0" interior="0" model="1609" posX="-2225.376953125" posY="2333.6584472656" posZ="7.546875" rotX="0" rotY="0" rotZ="273.76263427734" /> The object move now from left to right all the time Have fun!
  24. My other script work better: function loadObjects() myobject = createObject ( 1609, 809.96142578125, -3110.8703613281, 593.13952636719, 0, 0, 273.76263427734 ) end addEventHandler("onResourceStart", getRootElement(), loadObjects) setTimer ( destroyElement, 30000, 0, myobject) addCommandHandler("setTimer", loadObjects) function moveObjects() moveObject(myobject, 10000, 855.62, -3110.33, 593.85 ) end setTimer ( moveObjects, 20000, 0 ) setTimer ( loadObjects, 20000, 0 ) addCommandHandler("setTimer", moveObjects) But the problem is when the turtle is on the endplace i want that the tutle object delete/remove i have test destroyElement but the object dout delete on the endplace. Is there a way for fix that?????
  25. this is my mapfile: <map mod="deathmatch" version="1.0"> <meta> <object id="turtle" dimension="0" interior="0" model="1609" posX="809.96142578125" posY="-3110.8703613281" posZ="593.13952636719" rotX="0" rotY="0" rotZ="273.76263427734" /> </map>
×
×
  • Create New...