Jump to content

justn

Members
  • Posts

    527
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by justn

  1. All he's saying is to replace this ( from his earlier code ) star = createObject (1247, 653.35773, -1769.18567, 13.57368 ) to star = createPickup(653.35773, -1769.18567, 13.57368, 3, 1239, 60000) -- I got some of this from what you posted earlier
  2. This should work, if you are still having this problem, then show me your next code when the player hits the marker vehicleGUI = guiCreateWindow(314, 215, 160, 211, "", false) guiWindowSetSizable(vehicleGUI, false) guiSetVisible(vehicleGUI,false) vehLabelOne = guiCreateLabel(13, 36, 15, 15, "1.", false, vehicleGUI) vehButtonOne = guiCreateButton(38, 26, 107, 36, "LSPD Vehicle", false, vehicleGUI) vehLabelTwo = guiCreateLabel(13, 86, 15, 15, "2.", false, vehicleGUI) vehButtonTwo = guiCreateButton(38, 76, 107, 36, "LSPD Rancher", false, vehicleGUI) vehLabelThree = guiCreateLabel(13, 138, 15, 15, "3.", false, vehicleGUI) vehButtonThree = guiCreateButton(38, 128, 107, 36, "LSPD Motorbike", false, vehicleGUI) vehClose = guiCreateButton(86, 179, 64, 22, "Close", false, vehicleGUI) function onMarkerHit(hitElement,matchingDimension) if ( hitElement == localPlayer) then if source == vehMarker then guiSetVisible(vehicleGUI,true) showCursor ( true ) end end end addEventHandler("onClientMarkerHit",root,onMarkerHit)
  3. function setHandling() for key,veh in ipairs(getElementsByType("vehicle")) do if (getElementData(veh, "faction") == 72) then setVehicleHandling(veh, "engineAcceleration", 20) setVehicleHandling(veh, "maxVelocity", 165) setVehicleHandling(veh, "steeringLock", 45) end if (getElementData(veh, "faction") == 72) then setVehicleHandling(veh, "engineAcceleration", 22) setVehicleHandling(veh, "maxVelocity", 200) setVehicleHandling(veh, "steeringLock", 50) end if (getElementData(veh, "faction") == 72) then setVehicleHandling(veh, "engineAcceleration", 15) setVehicleHandling(veh, "maxVelocity", 180) setVehicleHandling(veh, "brakeDeceleration", 1000) setVehicleHandling(veh, "tractionMultiplier", 0)--. end if (getElementData(veh, "faction") == 72) then setVehicleHandling(veh, "engineAcceleration", 22) setVehicleHandling(veh, "maxVelocity", 200) setVehicleHandling(veh, "steeringLock", 50) setVehicleHandling(veh, "brakeDeceleration", 1000) end end end addEventHandler("onResourceStart", getRootElement(), setHandling)
  4. local Positions = { { 653.35773, -1769.18567, 13.57368 }, --{ x, y, z }, } for index = 1, #Positions do local test = createPickup ( Positions [ index ] [ 1 ], Positions [ index ] [ 2 ], Positions [ index ] [ 3 ], 3, 1239, 10000 ) end addEventHandler("onPickupHit",resourceRoot, function(player) --setPlayerWantedLevel(player,getPlayerWantedLevel(player)-1) --setPedSkin ( player, 271 ) --skin giveWeapon(player, 24, 200, true) -- --setElementHealth(player, 100) --vida --setPedArmor(player, 90) --colete end )
  5. local Positions = { { 1548, 1681, 13 }, --{ x, y, z }, } for index = 1, #Positions do Pickup = createPickup ( Positions [ index ] [ 1 ], Positions [ index ] [ 2 ], Positions [ index ] [ 3 ], 3, 1239, 60000 ) end
  6. Sorry if i have misread your code, don't understand you that much When the player enters the vehicle, you can check if the vehicle has a element data. and if it does not, then you can set the element data and outputChatBox, and if it does have the element data, then you can do whatever you want.
  7. Think he wants all of the pickup ids and images in one link.
  8. You have posted this on the wrong section Also, press "E" , when you see a red thing around the cursor, you should be able to delete them https://forum.multitheftauto.com/viewforum.php?f=94 <= Was supposed to be posted there
  9. Test = createObject ( 0, 0, 0, "cylinder", 2, 255, 255, 0, 255 ) addEventHandler("onClientResourceStart",resourceRoot, function() setTimer(function() moveObject(Test,2000,0,0,20) -- Makes the object goes up end,5000,0) setTimer(function() moveObject(Test,2000,0,0,0) -- Makes the object return to default position end,10000,0) end)
  10. Try this MarcadorBus1Car = createMarker(..) addEventHandler("onMarkerHit" , MarcadorBus1Car, function(thePlayer) if getElementType(thePlayer) == "player" and not getPedOccupiedVehicle(thePlayer) then busao = createVehicle( 431, 1271, -1822, 13.5, 0,0, 175) warpPedIntoVehicle(thePlayer, busao, 0 , true) end end) function qndSairBus1(vehicle,seat) if seat == 0 then if getElementModel(source) == 431 then desBus1 = setTimer(destroiBus1, 5000, 1) end end end addEventHandler("onVehicleExit" , getRootElement(), qndSairBus1) function qndSairBus2(vehicle,seat) if seat == 0 or seat == 1 or seat == 2 or seat == 3 or seat == 4 then if getElementModel(source) == 431 then killTimer(desBus1) end end end addEventHandler("onVehicleEnter" , getRootElement(), qndSairBus2) function destroiBus1() if isElement(busao) then destroyElement(busao) end end
  11. I'm not exactly sure if anyone will take a look at a code with 353 lines. Debug errors?
  12. You're welcome and If you have problems, then you can post your code. and If I'm online then maybe I can fix it for you.
  13. You can set a timer to destroy the vehicle when the player exits the vehicle, and when he enters again, kill the timer.
  14. So, when the other player hits the marker , your vehicle destroys ? If yes then try defining the variable 'heli' locally and not globally. local heli = createVehicle( 425, 234, 1967, 17, 0,0, 90) //EDIT: Sorry If I have misread what you were trying to say, Just don't understand your english very well
  15. justn

    Server name

    You can create the dx text or gui label using guieditor which can be found on the mta community.
  16. if (getTeamName (getPlayerTeam(thePlayer))) == ("Staff") then Should Be if ( getTeamName ( getPlayerTeam ( thePlayer ) == "Staff" )) then
  17. justn

    Question

    https://wiki.multitheftauto.com/wiki/Call
  18. justn

    Small Problem

    This post was based on a radio script. but i fixed it before anyone can help me
  19. justn

    [HELP] Login

    Yes that would be the server, you don't need to add anything else
×
×
  • Create New...