Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Never call a function of your own like a native MTA function.
  2. Castillo

    Error

    Check your meta.xml, your script must be set as type = "server" instead of type = "client".
  3. I'm locking this topic. @Montiz: Please don't do this again, this section is to help others, not to tell them what not to use.
  4. function spawnvehicle ( thePlayer, commandname, target, vehicleid ) local vehicleid = tonumber ( vehicleid ) if ( not vehicleid ) then outputChatBox ( "Invalid VehicleID was given", thePlayer ) else local targetp = getPlayerFromName ( target ) if ( not targetp ) then -- If the target is not online. targetp = thePlayer -- Set the "targetp" variable to the player who used the command. end local x, y, z = getElementPosition ( targetp ) local spawnedvehicle = createVehicle ( vehicleid, x + 2, y + 2, z + 1 ) if ( not spawnedvehicle ) then outputChatBox ( "Invalid VehicleID was given", thePlayer ) end end end addCommandHandler ( "spawnvehicle", spawnvehicle ) Read comments.
  5. From that position to the radius you set will start removing the world objects.
  6. So if a remote client hits that marker, it'll not execute your code.
  7. X-SHADOW: What he's saying is that if the radar area size is: 974x1305 it'll not appear on the Radar.
  8. Castillo

    paradise

    Se configura solo. Pero igual, estos recursos no pueden usarse con el MTA Paradise de Mabako, porque no usan las cuentas predeterminadas del MTA.
  9. Decis que no haga la animacion de morir? podrias intentar con una animacion.
  10. You're using getRootElement, that's wrong. function blowplayer ( thePlayer, commandname, target ) local targetp = getPlayerFromName ( target ) if ( targetp ) then -- Wenn Spieler existiert und in Auto if ( isPedInVehicle ( targetp) ) then -- If the target is on a vehicle .. blowVehicle ( getPedOccupiedVehicle ( targetp ) ) -- Blow his/her vehicle. else outputChatBox ( "The selected Player is not in a vehicle", thePlayer ) end else outputChatBox ( "Invalid player specified", thePlayer ) end end addCommandHandler ( "blowplayer", blowplayer ) Read comments.
  11. Castillo

    paradise

    No es opcional, el script fue creado para usar SQLite.
  12. You gotta use the exported function correctly: exports [ "bone_attach" ]:attachElementToBone ( arguments )
  13. It's like the function: attachElements but for Bones.
  14. Castillo

    help

    You're welcome.
  15. Castillo

    Need help

    addEventHandler ( 'onClientPlayerWasted', localPlayer, -- Instead of "root" we use "localPlayer" which is the player who died. function ( ) dxshow = true if isTimer( DxTime ) then killTimer( DxTime ) end DxTime = setTimer( function( ) dxshow = false end, 1000, 1 ) end ) Read comment.
  16. You can use this resource: https://community.multitheftauto.com/ind ... ls&id=2540
  17. function givevehicle1 ( thePlayer, commandname, target, vehicleid ) -- You had missing the first argument. local targetp = getPlayerFromName ( target ) if ( targetp ) then -- If the player exists .. local x, y, z = getElementPosition ( targetp ) -- Get his/her position. local givenvehicle = createVehicle ( tonumber ( vehicleid ), x, y, z ) -- Attempt to create a vehicle with the given ID. if ( givenvehicle ) then -- If the vehicle was created .. warpPedIntoVehicle ( target, givenvehicle ) -- Warp the player to the vehicle end end end addCommandHandler ( "givevehicle1", givevehicle1 ) Read comments.
  18. Castillo

    help

    Destroy it with: destroyElement.
  19. Castillo

    help

    You've named your function as the same as a native MTA function, that'll cause a stack overflow. function createWeaponPickup ( player ) local px, py, pz = getElementPosition ( player ) local currentweapon = getPlayerWeapon ( player ) if ( currentweapon ) then drop = createPickup ( px, py, pz, 2, currentweapon, 3000, 50 ) end end addCommandHandler ( "dropweapon", createWeaponPickup )
  20. Castillo

    how

    You're welcome.
  21. Castillo

    how

    getAllElementData
×
×
  • Create New...