Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. https://community.multitheftauto.com/ind ... ls&id=5445 It's my "afk_system", it's not even translated to Spanish as it says on the title. DONE
  2. function pedcreation ( player, cmd, skin ) local x, y, z = getElementPosition ( player ) local rot = getPedRotation ( player ) peds = createPed ( tonumber ( skin ) or 0, x, y, z - 1 , rot ) end addCommandHandler ( "piepie", pedcreation ) setPedSkin is outdated btw.
  3. I already posted an example, you can search for table examples in Lua at google.
  4. local scores = { 5, 3, 2 } It's like this: 1 = 5 2 = 3 3 = 2 You understand what I mean? the script will get the score from the 'rank' index from that table.
  5. exports.scoreboard:scoreboardAddColumn ( "score" ) local scores = { 5, 3, 2 } function Ranks ( ) local rank = exports.race:getPlayerRank ( source ) local score = scores [ rank ] if ( score ) then local zcore = tonumber ( getElementData ( source, "score" ) ) or 0 setElementData ( source, "score", ( zcore + score ) ) end end addEventHandler ( "onPlayerWasted", getRootElement(), Ranks )
  6. You are creating the marker client side, others won't be able to see it. You should make the markers server side, then when a player hits, store it on a table, like: Global: sellingPlayers = { } Inside function: sellingPlayers [ markerOwner ] = thePlayerWhoHitTheMarker
  7. addCommandHandler("/sell", openshop) That's wrong too, it should be "sell", because the default is "/sell" already.
  8. The event handlers should go after functions, also, you have: "ddEventHandler" in one ( missing 'a' ).
  9. function createTeamsOnStart ( ) teamStaff = createTeam ( "Staff", 255, 255, 255 ) end addEventHandler("onResourceStart", resourceRoot, createTeamsOnStart) function gostaff ( player, command ) setPlayerTeam ( player, teamStaff ) setElementModel ( player, 217 ) setPlayerNametagColor ( player, getTeamColor ( teamStaff ) ) end addCommandHandler ( "gostaff", gostaff )
  10. Skin mod: https://community.multitheftauto.com/ind ... ls&id=5441 DONE
  11. guiCreateWindow guiCreateGridList guiCreateButton guiGridListGetSelectedItem guiGridListGetItemText triggerServerEvent getVehicleModelFromName createVehicle warpPedIntoVehicle
  12. Hacelo, como lo hice yo.
  13. local x = tonumber(xmlNodeGetAttribute(node,'x')); local y = tonumber(xmlNodeGetAttribute(node,'y')); local z = tonumber(xmlNodeGetAttribute(node,'z')); There he defined it. @Brolis: Are you sure that x, y, z is returning numbers?
  14. That won't work, you forgot to define the function: function createGym ( thePlayer, command, objectModel ) local x, y, z = getElementPosition ( thePlayer ) local createdObject = createObject ( 2915, x, y, z ) end addCommandHandler ( "gym", createGym )
  15. El principal problema es que pusiste: getLocalPlayer ( ) en el addEventHandler , pero ahi tenia que ir 'root', el segundo problema era que tenias que verificar si el estado del click era "down", porque si no iva a abrirse y cerrarse. function Coche ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld ) if ( state == "down" and clickedWorld and getElementType ( clickedWorld ) == "vehicle" ) then if ( not isElement ( Coches ) ) then Cochess ( ) else guiSetVisible ( Coches, not guiGetVisible ( Coches ) ) end end end addEventHandler ( "onClientClick", root, Coche ) function Cochess ( ) Coches = guiCreateWindow(0.2101,0.1549,0.1149,0.3945,"Opciones de coche",true) X = guiCreateButton(0.2247,0.4557,0.0893,0.0534,"Cerrar",true,Coches) Park = guiCreateButton(0.2247,0.1888,0.0893,0.0534,"Aparcar",true,Coches) Multar = guiCreateButton(0.2247,0.3203,0.0893,0.0534,"Multar",true,Coches) end
  16. ' ' y " " es lo mismo . @ElMota: Solo definiste: "elTexto" una sola vez, no lo definiste dentro de cada 'if'.
  17. Castillo

    Bots

    Tenes el recurso: 'slothbot' de slothman, no? y el script ese que te di es server side.
  18. If you change the speed, it'll be changed for every zombie. To "disable" the FR GUI, you must stop the "freeroam" resource.
  19. local dxMessage = { } dxStatus = false function dxEvent ( message, r, g, b ) for index, message in ipairs ( dxMessage ) do dxDrawText ( message [ 1 ], 573, 1040, 1516, 1080, tocolor ( message [ 2 ], message [ 3 ], message [ 4 ], 255 ), 1.5, "arial", "center", "center", false, false, true ) dxStatus = true end dxStatus = false end function removeMessages ( ) removeEventHandler ( "onClientRender", root, dxEvent ) end function dxOutput ( message, r, g, b ) if ( dxStatus ) then removeEventHandler ( "onClientRender", root, dxEvent ) outputChatBox ( "active" ) killTimer ( theTimer ) end table.insert ( dxMessage, { message, r, g, b } ) addEventHandler ( "onClientRender", root, dxEvent ) theTimer = setTimer ( removeMessages, 4000, 1 ) dxStatus = ( not dxStatus ) end addEvent ( "dxOutput", true ) addEventHandler ( "dxOutput", root, dxOutput ) addCommandHandler ( "lol", function ( ) triggerEvent ( "dxOutput", root, "testing hehe", 0, 250, 0 ) end ) That's what you mean?
  20. I don't really get your problem, could you explain yourself further?
  21. Castillo

    Bots

    El slothbot y el zombies lo unico que tienen en comun es que los creo la misma persona, pero funcionan individual mente. exports [ "slothbot" ]:spawnBot ( 0, 0, 10, 0, 0, 0, 0, nil, 31, "hunting" ) Eso creara un bot en las coordenadas: 0, 0, 10 con una M4.
×
×
  • Create New...