-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Latest version uploaded was on: 2009, what do you think?
-
viewtopic.php?f=108&t=47773 With that shader you can replace the lights ( I think they are part of vehicles.txd ).
-
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
-
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.
-
If you want to learn how to make more stuff, then you better start learning. viewtopic.php?f=148&t=40809
-
setElementDimension And setElementPosition With playSound3D
Castillo replied to micheal1230's topic in Scripting
Why don't you just create the sound instead of setting the position? -
You can do this: setVehicleDamageProof ( getPedOccupiedVehicle ( getPlayerFromName ( "INSERTPLAYERNAME" ) ), true )
-
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.
-
Show us what you tried.
-
Talves porque estas usando: "exportaciones" en ves de "exports"?
-
You can create a command to turn your vehicle with damage proof with the following functions: addCommandHandler getPedOccupiedVehicle setVehicleDamageProof
-
setElementDimension And setElementPosition With playSound3D
Castillo replied to micheal1230's topic in Scripting
You're welcome. -
setElementDimension And setElementPosition With playSound3D
Castillo replied to micheal1230's topic in Scripting
theSound = playSound3D ( args... ) setElementDimension ( theSound, 1 ) setElementPosition ( theSound, 0, 0, 5 ) -
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 )
-
Remove this line: outputChatBox ( "Map info: ".. mapInfo ) And see what the other one returns.
-
Right click the GUI, search for: "Relative" and "Absolute", choose "Relative".
-
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.
