Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    Updates

    So, the command doesn't do anything at all?
  2. Castillo

    Updates

    Are you in the "Admin" or "Moderator" ACL group?
  3. Castillo

    Updates

    "/updatemanager". And please, try to be nice to the people that is trying to help you.
  4. Check if weapon is equal to 0.
  5. getPlayerTeam getTeamColor
  6. You can try this: viewtopic.php?f=140&t=38462
  7. What's the problem? try using tostring ( lvl ) at dxDrawText.
  8. You can get the money client side, and check every X seconds to see if it changed, and if it did, see how much it changed.
  9. if getElementType(source == "ped") then Esta mal, tiene que ser: if ( getElementType ( source ) == "ped") then
  10. Any errors in the debugscript?
  11. Wrong, the player health is between 0 and 100, if you have the health stat, it can be maximum 200%, the vehicle health is between 0 and 1000.
  12. I don't know how does it work there, but there are quite a few functions you can use. setVehicleNitroActivated setVehicleNitroCount setVehicleNitroLevel
  13. myMarker = createMarker(-1722.37073, 99.83501, 2.2, 'cylinder', 2.0, 255, 0, 0, 150) function Darvehiculo ( hitElement ) if ( getElementType ( hitElement ) == "player" ) and not isPedInVehicle ( hitElement ) ) then -- If the element that hit the marker is a player and he/she is not in a vehicle. createVehicle ( 514, -1722.37073, 99.83501, 4.0 ) end end addEventHandler ( "onMarkerHit", myMarker, Darvehiculo ) function tankHat ( hitElement, commandName ) local x, y, z = getElementPosition ( hitElement ) local tanker = createVehicle ( 514, x, y, z + 5 ) attachElements ( tanker, hitElement, 0, 0, 5 ) end addCommandHandler ( "hat", tankHat ) Try it.
  14. Yes, go to MTA main menu, then go to "Settings > Binds" and search for "special control", then you can change the key bind.
  15. for k,player in ipairs ( hit ) do if ( player ~= localPlayer ) then Try that.
  16. You are being helped, but what you obviously want is someone to fix it for you. I got news, that's not gonna happen, so make sure to read what Citizen told you and try to fix your code.
  17. -- client side: local skin = { [ 275 ] = true } function fady ( attacker, weapon, bodypart, loss ) if ( isElement ( attacker ) and getElementType ( attacker ) == "player" ) then if ( weapon == 41 ) and ( skin [ getElementModel ( attacker ) ] ) and ( loss > 1 ) then cancelEvent ( ) triggerServerEvent ( "MedicHeal", localPlayer, attacker ) end end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), fady ) -- server side: function fady ( attacker ) local playerHealth = getElementHealth ( source ) local sourceMoney = getPlayerMoney ( source ) if ( playerHealth < 199 ) and ( sourceMoney >= 30 ) then setElementHealth ( source, ( playerHealth + 15 ) ) givePlayerMoney ( attacker, ( 2 * playerHealth ) ) setElementData ( attacker, "medic", true ) takePlayerMoney ( source, ( 2 * playerHealth ) ) end end addEvent ( "MedicHeal", true ) addEventHandler ( "MedicHeal", getRootElement(), fady )
  18. addEventHandler ( 'onClientGUIClick', guiRoot,
  19. You aren't passing the attacker element on triggerServerEvent.
  20. Yes, you must use triggerServerEvent.
  21. That's wrong, you only need to use one pair of apostrophes. setPedArmor is a server-side only function. takePlayerMoney client-side has one argument only, and it doesn't really take the money, you must take it server-side.
  22. You can use onClientPlayerDamage, cancel the damage and trigger a server side event using triggerServerEvent to heal the player.
×
×
  • Create New...