Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. theVehicle = { } function admt ( thePlayer ) if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Admin" ) ) then local x, y, z = getElementPosition ( thePlayer ) local rx, ry, rz = getElementRotation ( thePlayer ) theVehicle [ thePlayer ] = createVehicle ( 526, x, y, z, rx, ry, rz, "Staff Car" ) local handlingTable = getVehicleHandling ( theVehicle [ thePlayer ] ) warpPedIntoVehicle ( thePlayer, theVehicle [ thePlayer ] ) local newVelocity = ( handlingTable [ "maxVelocity" ] + ( handlingTable [ "maxVelocity" ] / 100 * 40 ) ) setVehicleHandling ( theVehicle [ thePlayer ], "numberOfGears", 5 ) setVehicleHandling ( theVehicle [ thePlayer ], "driveType", 'awd' ) setVehicleHandling ( theVehicle [ thePlayer ], "maxVelocity", newVelocity ) setVehicleHandling ( theVehicle [ thePlayer ], "engineAcceleration", handlingTable [ "engineAcceleration" ] +8 ) end end addCommandHandler ( "staffCar", admt )
  2. Do you have the table: "theVehicle" defined?
  3. You can use this resource: https://community.multitheftauto.com/ind ... ils&id=381
  4. Change this: function admt(source) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then To: function admt(thePlayer) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then And test it.
  5. You are using 'thePlayer', but your argument is 'source'.
  6. DX aren't elements, you can't do it this way.
  7. https://community.multitheftauto.com/ind ... ails&id=92
  8. En mi script? imposible, yo no use esa funcion.
  9. Tema movido a Spanish > Scripting. Editando el script que te da el jetpack.
  10. local theMarker = createMarker ( 2290.21240, 2431.08228, 8.3, "cylinder", 1.5, 255, 0, 0, 170 ) function teleport ( hitPlayer ) if ( getElementType ( hitPlayer ) == "player" ) then setElementInterior ( hitPlayer, 3, 238.66371, 139.28282, 1003.02344 ) end end addEventHandler ( "onMarkerHit", theMarker, teleport )
  11. El primer argumento de 'onVehicleStartEnter' es el jugador que entro, el segundo es el asiento y el tercero es si hizo "hijack". function bloqeo ( thePlayer, seat, jacked ) local elev = tonumber ( getElementData ( thePlayer, "level" ) ) or 0 local id = getElementModel ( source ) if ( seat == 0 ) and ( id == 432 or id == 425 or id == 420 ) and ( elev < 40 ) then outputChatBox ( "[sERVER]: No puedes entrar a este vehiculo por que no tienes el level necesario", thePlayer, 255, 100, 100, false ) cancelEvent ( ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), bloqeo )
  12. Vehicle mod: https://community.multitheftauto.com/ind ... ls&id=6070 DONE
  13. getElementTeam That function does not exist, you must use: getPlayerTeam getTeamName
  14. Topic moved to "Scripting". You can download the mods from mod sites like gtainside.com, and then you import them to MTA with the engine functions. https://wiki.multitheftauto.com/wiki/Cli ... _functions
  15. Castillo

    Pregunta

    El 'source' de los eventos depende del evento, por ejemplo: https://wiki.multitheftauto.com/wiki/OnMarkerHit El 'source' de onMarkerHit es el marcador que tocaste.
  16. http://gtamap.delux-host.com/converter/
  17. You want to freeze the vehicle when hit the marker? I don't understand the second problem.
  18. Castillo

    Teleport

    createMarker getElementType setElementPosition onMarkerHit
  19. Castillo

    Teleport

    Hay muchas maneras, vos queres por comando o al tocar un marcador?
  20. You could use server side text functions: https://wiki.multitheftauto.com/wiki/Ser ... _functions You can also make an element and set to that element the time left every second. Then get it client side and draw it. Server side: createElement setElementData getTimerDetails setTimer Client side: getElementByID getElementData
  21. Use: onVehicleEnter which is triggered when you enter a vehicle, meaning when the map starts and you get warped to your vehicle.
  22. Que queres decir con aplicar?
×
×
  • Create New...