Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Maybe the TXD/DFF is wrong, have you tried replacing it with another mod?
  2. The resource is outdated badly, I didn't get free time to update it yet ( if I ever do ).
  3. https://wiki.multitheftauto.com/wiki/Ser ... our_server
  4. I can, but I won't, because that wouldn't be helpful, you should learn the basics.
  5. That's all wrong, read the basics and then start with something else.
  6. addCommandHandler ( "blip", function ( thePlayer ) for index, element in ipairs ( getAttachedElements ( thePlayer ) ) do if ( getElementType ( element ) == "blip" ) then setElementVisibleTo ( element, root, ( not isElementVisibleTo ( element ) ) ) end end end ) Not sure if that'll work though.
  7. dxDrawRectangle dxDrawText
  8. Stolen: https://community.multitheftauto.com/ind ... ls&id=5428 DONE
  9. Nice job , keep up the good work
  10. Castillo

    Duda

    Y donde esta definido 'source'?
  11. Castillo

    Duda

    Postea el script completo.
  12. addCommandHandler ( "blip", function ( thePlayer ) for index, element in ipairs ( getAttachedElements ( thePlayer ) ) do if ( getElementType ( element ) == "blip" ) then destroyElement ( element ) end end end )
  13. Castillo

    Tables

    You're welcome.
  14. Castillo

    Tables

    Because if you put it at the top, the function won't exist yet, other way would be using onResourceStart event. local objects = { { model = 1210, x = -1318, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 }, { model = 1210, x = -1322, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 }, { model = 1210, x = -1330, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 } } addEventHandler ( "onResourceStart", resourceRoot, function ( ) createRandomLocation ( ) end ) function giveCash ( player ) givePlayerMoney ( player, 20000 ) destroyElement ( mymarker ) destroyElement ( myobject ) createRandomLocation ( ) end function createRandomLocation ( ) local object = objects [ math.random ( #objects ) ] myobject = createObject ( object.model, object.x, object.y, object.z, object.rot3, object.rot2, object.rot ) local x, y, z = getElementPosition ( myobject ) mymarker = createMarker ( x, y, z, "cylinder", 4, 200, 0, 0, 255 ) addEventHandler ( "onMarkerHit", mymarker, giveCash ) end
  15. local locationsTable = { { 0, 0, 1 }, { 0, 0, 2 }, { 0, 0, 3 }, { 0, 0, 4 }, { 0, 0, 5 }, { 0, 0, 6 }, { 0, 0, 7 }, { 0, 0, 8 }, { 0, 0, 9 }, { 0, 0, 10 }, { 0, 0, 11 }, { 0, 0, 12 }, { 0, 0, 13 }, { 0, 0, 14 }, { 0, 0, 15 }, { 0, 0, 16 }, { 0, 0, 17 }, { 0, 0, 18 }, { 0, 0, 19 }, { 0, 0, 20 } } function getRandomLocations ( ) local found = { } for i = 1, 10 do table.insert ( found, locationsTable [ math.random ( #locationsTable ) ] ) end return found end for index, loc in ipairs ( getRandomLocations ( ) ) do local x, y, z = unpack ( loc ) -- Your pickup creating code here. end
  16. Castillo

    Tables

    local objects = { { model = 1210, x = -1318, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 }, { model = 1210, x = -1322, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 }, { model = 1210, x = -1330, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 } } function giveCash ( player ) givePlayerMoney ( player, 20000 ) destroyElement ( mymarker ) destroyElement ( myobject ) createRandomLocation ( ) end function createRandomLocation ( ) local object = objects [ math.random ( #objects ) ] myobject = createObject ( object.model, object.x, object.y, object.z, object.rot3, object.rot2, object.rot ) local x, y, z = getElementPosition ( myobject ) mymarker = createMarker ( x, y, z, "cylinder", 4, 200, 0, 0, 255 ) addEventHandler ( "onMarkerHit", mymarker, giveCash ) end createRandomLocation ( )
  17. Castillo

    Tables

    local objects = { { model = 1210, x = -1318, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 }, { model = 1210, x = -1322, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 }, { model = 1210, x = -1330, y = -145, z = 13.25, rot = 90, rot2 = 0, rot3 = 90 } } local object = objects [ math.random ( #objects ) ] myobject = createObject ( object.model, object.x, object.y, object.z, object.rot3, object.rot2, object.rot ) local x,y,z = getElementPosition ( myobject ) mymarker = createMarker ( x, y, z, "cylinder", 4, 200, 0, 0, 255 ) Did you mean that?
  18. function hudChanger ( ) showPlayerHudComponent ( source, "all", false ) end addEventHandler ( "onPlayerJoin", getRootElement(), hudChanger ) That should hide all the default HUD when you join the game.
  19. Topic moved to: "Resources" section.
  20. local positions = { { -643.82635498047, 1945.7033691406, 2 }, { -1980, 4991, 39 } } function (attacker, gun) if getTeamName(getPlayerTeam(attacker)) == "Police" then -- if attacker was a cop if gun == 23 or gun == 3 then -- if it was a tazer or stick setElementPosition(source, unpack ( positions [ math.random ( #positions ) ] ) ) end end end )
  21. Castillo

    Que falla

    No existen eventos para hacer eso, lo unico que podes es comparar la posicion del cursor con la de la imagen.
  22. Castillo

    i can ?

    You're welcome.
×
×
  • Create New...