Jump to content

Sasu

MTA Contributors
  • Posts

    1,056
  • Joined

  • Last visited

Everything posted by Sasu

  1. Is there any function to get download size ?
  2. Sasu

    help edit

    Line 34: local nameLength = dxGetTextWidth(pname,textScale,textFont) -> local nameLength = dxGetTextWidth(pname:gsub("#%x%x%x%x%x%x", "") ,textScale,textFont)
  3. I dont know if it works. Maybe yes. addEventHandler("onPlayerCommand", root, function(cmd) if cmd == "reconnect" then cancelEvent() end end)
  4. Sasu

    Funcion

    Puedes usar onClientPlayerWeaponFire y si quieres puedes usar triggerServerEvent para hacer algo en el server side.
  5. Sasu

    Return nil

    I hope that this will be helpful in the future. Thank you.
  6. Sasu

    Return nil

    You're right. Thank you very much.
  7. Sasu

    Return nil

    Oh, I didnt know that. So, I have to use 'pairs' ?
  8. Sasu

    Return nil

    I think you didnt understand or I am wrong. I want to check in all the colshapes.
  9. Sasu

    Return nil

    I made this function to check if the player is in some colshape in table. function isPlayerWithInZone(source) if source and getElementType(source) == "player" then outputChatBox("TEST1", root) for i,v in ipairs(SXDueloE) do outputChatBox(getElementType(v[1])..", "..getElementType(v[2]), root) if isElementWithinColShape(source, v[2]) then theReturn = true break end end else theReturn = false end return theReturn end And Here when It create the colshape addEventHandler("onResourceStart", resourceRoot, function() for i,v in ipairs(markerPos) do local x,y,z = unpack(v) local marker = createMarker(x, y, z, "cylinder", 2, 255, 0, 0, 100) createBlipAttachedTo(marker, 56) local col = createColSphere(x, y, z, 10) SXDueloE[marker] = {marker, col} end end) My question is why my function return nil?
  10. Sasu

    Web Hosting

    Hola a todos. Estoy en busca de una provedor de web hosting pago que tenga banda ancha ilimitada, incluya dominio gratis, mysql y ,en lo posible, barato. Me recomiendan alguno?
  11. If you are in the same resource, you can use as normal function. yourFunctionName()
  12. I want delete my resource: https://community.multitheftauto.com/index.php?p= ... ls&id=6688 DONE
  13. Sasu

    Es posible?

    Usa el recurso 'slothbot' de slothman https://community.multitheftauto.com/index.php?p= ... ils&id=672 Fijate sus funciones. Eso te ayudara.
  14. Server: function getPlayerKillsInOrder() theTable = {} for i, acc in ipairs(getAccounts()) do local name = getAccountName(acc) local kills = getAccountData(acc, "kills") or 0 table.insert(theTable, {kills, name}) end table.sort(theTable) return theTable end addEvent("refreshList", true) addEventHandler("refreshList", root, function() triggerClientEvent(source, "onRequestRefresh", source, getPlayerKillsInOrder()) theTable = nil end) Client: addEvent("onRequestRefresh", true) addEventHandler("onRequestRefresh", root, function(theTable) guiGridListClear(GUIEditor.gridlist[1]) for i, v in ipairs(theTable) do local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, tostring(i), false, false) guiGridListSetItemText(GUIEditor.gridlist[1], row, 2, tostring(v[2]), false, false) guiGridListSetItemText(GUIEditor.gridlist[1], row, 3, tostring(v[1]), false, false) end end) Why the debugscript says: ERROR: attempt to compare two table values ?
  15. Si tu quieres que el auto se destruya cuando el conductor salga, que en este caso seria el administrador que lo aparecio, se destruya. local adminVehicle = {} function infernus(thePlayer, cmdName) local x, y, z = getElementPosition(thePlayer) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then if (isPedInVehicle(thePlayer)) then outputChatBox("Sal de tu auto actual ( "..getVehicleName(getPedOccupiedVehicle(thePlayer)).." )", thePlayer, 0, 250, 0) else adminVehicle[thePlayer] = createVehicle(411, x+2, y+2, z)--- ID del auto if adminVehicle[thePlayer] then outputChatBox("Creaste el auto", thePlayer, 0, 250, 0) warpPedIntoVehicle(thePlayer, adminVehicle[thePlayer]) else outputChatBox("Ha ocurrido un error al crear el vehiculo. Revisa bien los argumentos", thePlayer, 255, 0, 0) end end else outputChatBox("Tu no eres del grupo ACL 'Admin' por lo tanto no puedes usar este comando. ( /"..cmdName.." )", thePlayer, 255, 0, 0) end end addCommandHandler("auto", infernus) function destroyAdminVehicle(thePlayer, seat) if adminVehicle[thePlayer] and source == adminVehicle[thePlayer] and seat == 0 then outputChatBox("Tu vehiculo '"..getVehicleName(source).."' ha sido destruido", thePlayer, 0, 255, 0) destroyElement(source) adminVehicle[thePlayer] = nil end end addEventHandler("onVehicleExit", root, destroyAdminVehicle)
  16. triggerServerEvent -- Ejecutar una funcion server logIn -- Loguear a un jugador addAccount -- Registrar una cuenta
  17. Sasu

    Turf system

    What updates do you want in my turf system? ( https://community.multitheftauto.com/index.php?p= ... ls&id=6772 )
  18. You can make a command in client side with engineReplaceModel if you mean what I think.
  19. El primer parametro de addCommandHandler devuelve el jugador quien lo ejecuta, en server side. Deberas usar getPedOccupiedVehicle para obtener el vehiculo del jugador.
  20. Sasu

    Ayuda

    viewforum.php?f=145
  21. Usa getElementPosition para obtener las coordenadas de un jugador.
×
×
  • Create New...