Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. No has posteado nada, pone el codigo con las tags de Lua.
  2. Castillo

    Push script

    The part of name works perfectly fine, I'd /push Cast and my name was (SAUR)Castillo and it worked. Maybe it doesn't work if your name is like "ABC" and you do "abc", the lower case.
  3. Castillo

    Push script

    it means that the player does not exists.
  4. Castillo

    Push script

    I tested the script, it works fine.
  5. Hi, today I wanted to implement this function as a replacement of my AFK script, but for some reason the function is not reseting the time after the player leaves, I connect to the server and pum, kicked for being "Idle".
  6. Castillo

    Push script

    Copy my last code again, I found the bug.
  7. Castillo

    Push script

    Are you writing the command like this: /push <the player name who to push>
  8. Castillo

    Push script

    function push (thePlayer, commandName, namepart) local player = findPlayer(namepart) if (not player) then outputChatBox("* /push: player not found", thePlayer) else local vehicle = getPedOccupiedVehicle(player) if (not vehicle) then outputChatBox("* /push: This player is not in a vehicle", thePlayer) return end local x,y,z = getElementVelocity(vehicle) setElementVelocity ( vehicle, x, y, z + 0.25 ) end end addCommandHandler("push", push) function findPlayer(playerPart) local pl = getPlayerFromName(playerPart) if isElement(pl) then return pl else for i,v in ipairs (getElementsByType ("player")) do if (string.find(getPlayerName(v),playerPart)) then return v end end end end
  9. Podrias crear tu propio evento cuando un zombie se crea, busca donde diga "createPed" y pone debajo: triggerEvent("onZombieCreated",zomb) -- Esto iria en zombies_server.lua zomb = el zombie que se creo. Luego puedes hacer esto: addEvent("onZombieCreated",true) addEventHandler("onZombieCreated",root, function () if (getElementModel (source) == 87) then setPedOnFire(source, true) end end)
  10. You can set a data on the player account (or using MySQL/SQLITE you can save the data on their serials).
  11. Castillo

    Tuto

    Descarga un programa llamado "xampp", es un programa que contiene Apache, MySQL, Filezilla, Mercury.
  12. 'source' seria lo mas comun de que fuese el zombie, pero slothman al parecer no penso igual, no hay ningun evento para cuando un zombie spawnea.
  13. Castillo

    Buy map bug D:

    That doesn't make any sense, getResources() returns a table, not a boolean.
  14. Because such event does not exists... you must create your own event or function.
  15. Castillo

    Push script

    @Al3grab: Do you even know what are you saying? because it makes no sense . function push (thePlayer, commandName, namepart) local player = findPlayer(namepart) if (not player) then outputChatBox("* /push: player not found", thePlayer) else local vehicle = getPedOccupiedVehicle(player) if (not vehicle) then outputChatBox("* /push: This player is not in a vehicle", thePlayer) return end local x,y,z = getElementVelocity(vehicle) setElementVelocity ( vehicle, x, y, z + 0.25 ) end end addCommandHandler("push", push) function findPlayer(name) if not name then return false end local name = name:lower() for i, p in ipairs(getElementsByType("player")) do local fullname = getPlayerName(p):lower() if string.find(fullname:gsub("#%x%x%x%x%x%x", ""), name, 1, true) then return p end end return false end
  16. Castillo

    Help

    That means that you set the script as a server-side script in the meta.xml, check if the script type is "client" or "server".
  17. Castillo

    Tuto

    El mta-paradise usa MySQL, necesitaras configurar un servidor MySQL.
  18. onZombieSpawn no tiene a source como el zombie que aparecio, no te va a funcionar. P.S: createFire es client side.
  19. Castillo

    Tuto

    "el RPG de mtasa.com" es un chiste? vos pensas que somos telepaticos? como se supone que deberiamos saber de cual "RPG" hablas? P.S: Fijate en la descripcion del resource.
  20. Skin mod: https://community.multitheftauto.com/index.php?p= ... ls&id=3372
  21. @Okumura: Por favor intenta usar un solo topic para todas las preguntas que tengas con el tema relacionado.
×
×
  • Create New...