Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Latest version uploaded was on: 2009, what do you think?
  2. viewtopic.php?f=108&t=47773 With that shader you can replace the lights ( I think they are part of vehicles.txd ).
  3. Yes, you can replace weapons, but you need to replace the weapon object model, not the weapon ID, get the model IDs from here: https://wiki.multitheftauto.com/wiki/Weapons
  4. addCommandHandler ( 'fixall', function ( thePlayer ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Admin" ) ) then for _, vehicle in ipairs ( getElementsByType ( 'vehicle' ) ) do fixVehicle ( vehicle ) end outputChatBox ( '#FF0000[iNFO]: #FFFFFFAll vehicles were repaired by admin [ '.. getPlayerName ( thePlayer ) ..' ]', root, 255, 255, 255, true ) end end ) Errors: 1: Server side commands are created for everyone, you don't need to create it on login. 2: getElementsByType returns a table, not an element. 3: getRootElement is not the player who used the command.
  5. Castillo

    Hide Name

    setPlayerNametagShowing
  6. Castillo

    Libereria

    Eso no es lo que el se refiere. @Pekio: No se si existe.
  7. If you want to learn how to make more stuff, then you better start learning. viewtopic.php?f=148&t=40809
  8. Why don't you just create the sound instead of setting the position?
  9. You can do this: setVehicleDamageProof ( getPedOccupiedVehicle ( getPlayerFromName ( "INSERTPLAYERNAME" ) ), true )
  10. Because that's not what you have to do, you have to get the vehicle of the player you are trying to set the damage proof to.
  11. Talves porque estas usando: "exportaciones" en ves de "exports"?
  12. You can create a command to turn your vehicle with damage proof with the following functions: addCommandHandler getPedOccupiedVehicle setVehicleDamageProof
  13. theSound = playSound3D ( args... ) setElementDimension ( theSound, 1 ) setElementPosition ( theSound, 0, 0, 5 )
  14. Castillo

    Question

    Copy the code again.
  15. Castillo

    Question

    local marker1 = createMarker ( 2316.25, -1933, 12, 'cylinder', 3.0, 155, 155, 0, 155 ) theTrashCar = createVehicle ( 408, 2201, -1978, 17, 0, 0, 270 ) addEventHandler ( 'onMarkerHit', marker1, function ( thePlayer ) if ( getElementType ( thePlayer ) == "player" and getPedOccupiedVehicle ( thePlayer ) == theTrashCar ) then outputChatBox ( "Vehicle match" ) triggerClientEvent ( thePlayer, 'marker1_', thePlayer ) end end )
  16. Remove this line: outputChatBox ( "Map info: ".. mapInfo ) And see what the other one returns.
  17. Castillo

    Question

    Mind posting the whole script?
  18. Castillo

    Question

    You get the vehicle of the player who hit the marker and check if it's the same as monsterNot.
  19. Right click the GUI, search for: "Relative" and "Absolute", choose "Relative".
  20. addEvent("onClientRequestRespawn", true) addEventHandler("onClientRequestRespawn", getRootElement(), function(mapInfo, mapOptions, gameOptions,vehicleData) outputChatBox ( "Map info: ".. mapInfo ) outputChatBox ( "Map name: ".. mapInfo.name ) if (ismapDM(mapInfo.name) == 1) then -- source is the player that requested respawn. -- spawn at the position where last saved. triggerClientEvent(source, 'onClientCall_race', source, "Spectate.stop", 'manual') triggerEvent('onClientRequestSpectate', source, false) spawnPlayer(source, vehicleData.posX, vehicleData.posY, vehicleData.posZ) local vehicle = exports.race:getPlayerVehicle(source) warpPedIntoVehicle(source, vehicle) triggerClientEvent(source, 'onClientCall_race', source, "Spectate.stop", 'manual') setElementData(source, "race.spectating", true) setElementData(source, "status1", "dead") setElementData(source, "status2", "") --setElementData(source, "state", "training") setElementData(source, "race.finished", true) setCameraTarget(source, source) setElementData(vehicle, "race.collideworld", 1) setElementData(vehicle, "race.collideothers", 0) setElementData(source, "race.alpha", 255) setElementData(vehicle, "race.alpha", 255) setElementHealth(vehicle, vehicleData.health) setElementModel(vehicle, 481) -- fix motor sound. setElementModel(vehicle, tonumber(vehicleData.model)) setElementPosition(vehicle, vehicleData.posX, vehicleData.posY, vehicleData.posZ) setElementRotation(vehicle, vehicleData.rotX, vehicleData.rotY, vehicleData.rotZ) if(vehicleData.nitro ~= nil)then addVehicleUpgrade(vehicle, tonumber(vehicleData.nitro)) end setElementFrozen(vehicle, true) toggleAllControls(source, true) setVehicleLandingGearDown(vehicle, true) setTimer(delayedRespawn, 2000, 1, source, vehicle, vehicleData) elseif (ismapDM(mapInfo.name) == 2) then cancelEvent() elseif (ismapDM(mapInfo.name) == 3) then cancelEvent() end end) See what does it output.
×
×
  • Create New...