Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. No, si te lo paso un "amigo" puede ser que el lo haya robado de un servidor, si no te dio el server side es la unica explicacion.
  2. De donde sacaste este script? por lo que veo no lo creaste vos. P.D: Ese error significa que el cliente intenta llamar un evento del server side que no existe.
  3. Did you even read what I said? you must move the colshape.
  4. It does work, the elevator goes up, I'm pretty sure your problem is that you created the colshape in a wrong place, is not in the elevator. Use: setDevelopmentMode to enable the command /showcol, this way you can see the colshapes.
  5. Ami me funciona sin problemas.
  6. Maybe you have a script cancelling the damage done to ped(s)? By pass arguments you mean something like this: addEventHandler ( "onClientRender", root, function ( arg1, arg2, arg3 ) end ) If so, then is not possible to do that as far as I know.
  7. Eso es porque vos pones esto: showCursor(false) al principio de la funcion: createtempGate().
  8. You should start using the 'Search' feature, there are many topics related to this.
  9. Castillo

    I'm confused..

    1: Never call a function like a native MTA function. 2: Why do you need another function to count the alive players? you can just do: #table to count a table. 3: This should work: function getRaceAlivePlayers() local result = {} local _getAlivePlayers = getElementsByType("player") for i, v in ipairs(_getAlivePlayers) do if getElementData(v, "state") == "alive" then table.insert(result, v) end end return result end addEventHandler ( "onPlayerWasted", root, function ( ) if ( #getRaceAlivePlayers ( ) == 1 ) then outputChatBox ( getPlayerName ( getRaceAlivePlayers ( )[ 1 ] ) .. " has won" ) end end )
  10. Castillo

    Need help

    local myMarker = createMarker(2489.1613769531, -1668.5617675781, 11.800, 'cylinder', 2.2, 255, 0, 0, 150) local burnTimers = { } function MarkerHit( hitElement, matchingDimension ) local elementType = getElementType( hitElement ) if ( elementType == "player" ) then setPedOnFire ( hitElement, true ) if ( isTimer ( burnTimers[ hitElement ] ) ) then killTimer ( burnTimers[ hitElement ] ) end burnTimers[ hitElement ] = setTimer ( setPedOnFire, 2000, 0, hitElement, true ) end end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) function MarkerLeave ( leaveElement ) local elementType = getElementType( leaveElement ) if ( elementType == "player" ) then if ( isTimer ( burnTimers[ leaveElement ] ) ) then killTimer ( burnTimers[ leaveElement ] ) end setPedOnFire ( leaveElement, false ) end end addEventHandler( "onMarkerLeave", myMarker, MarkerLeave ) addEventHandler ( "onPlayerSpawn", root, function ( ) if ( isTimer ( burnTimers[ source ] ) ) then killTimer ( burnTimers[ source ] ) end setPedOnFire ( source, false ) end ) addEventHandler ( "onPlayerQuit", root, function ( ) if ( isTimer ( burnTimers[ source ] ) ) then killTimer ( burnTimers[ source ] ) end end )
  11. You can trigger the value to the client side using: triggerClientEvent
  12. The function get is server side only.
  13. Se usa como lo dice en la wiki.
  14. Me parece que vos pensas que todo es magico, como va a hacer eso solo? tenes que crearlo vos.
  15. No entiendo lo que queres decir. Esa funcion es para conectarse a un servidor MySQL, luego podes usar esa conexion en las funciones restantes.
  16. Usa las funciones integradas en el MTA: https://wiki.multitheftauto.com/wiki/DbConnect
  17. That script is just mess, where's "array" defined? also, getNormalCountryName doesn't exists.
  18. If you don't post the script, then we can't help you.
  19. Post your entire script then.
  20. function closeTheWindow() guiSetVisible(win, false) showCursor(false) end addEventHandler("onClientGUIClick", ok, closeTheWindow, false)
  21. Castillo

    Scoreboard

    Topic locked.
  22. Castillo

    car sound

    You can play them over the current sounds, you can't replace them.
  23. Castillo

    Need help

    You'll have to make a timer to set him on fire again. You must use: setTimer isElementWithinMarker setPedOnFire
  24. Castillo

    policejob help

    function policeJob ( attacker, attackerweapon, bodypart, loss ) local theSkin = getElementModel ( attacker ) local wanted = getPlayerWantedLevel ( source ) if ( attackerweapon == 3 ) and ( loss > 2 ) and ( theSkin == 281 ) and ( wanted > 0 ) then setElementPosition (source, 219, 110, 999, true) setTimer ( setElementPosition, 100000, 1, source, 236.32, 110.4, 1003.2) takePlayerMoney (source, 50) givePlayerMoney (attacker, 100) end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob)
×
×
  • Create New...