Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. You are using it as /push right? if you do /push it won't work.
  2. It is working, I've tested it, you must be in a vehicle to be able to get pushed.
  3. Firstly, this should go in the Scripting section. I only can see that you aren't pushing him up at all, so I've changed some things on it. addCommandHandler("push", function(p, c, t) local pushPlayer = findPlayer(t) if pushPlayer then local pushVehicle = getPedOccupiedVehicle(pushPlayer) if pushVehicle then local speedX, speedY, speedZ = getElementVelocity(pushVehicle) setElementVelocity(pushVehicle, speedX, speedY, speedZ+0.2) outputChatBox(getPlayerName(p).." pushes "..getPlayerName(pushPlayer).." up!") end end end ) function findPlayer(name) 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
  4. Get IMG tools and open gta3.img in GTA SA folder, if you know the name, you should be able to find it.
  5. I didn't upload any stats system... I don't know what he's talking about. P.S: Maybe you got it from another topic?
  6. Script does work, I've tested it with zombies by Slothman, everything worked fine, if you know how to use it of course. P.S: Copy my example again, I've fixed something. P.S2: Don't just copy & paste, try to fix something yourself.
  7. Castillo

    Frames script

    Brad, I think you should start with something easier if you don't have scripting knowledge.
  8. Castillo

    ayuda

    Las imagenes .gif no son soportadas en el MTA, para reproducirlas podrias hacer un script que cargue una imagen en cada render, o algo parecido.
  9. estaMiGodModeActivado = false function agregarGodmode() miActualVehiculo = getPedOccupiedVehicle ( getLocalPlayer() ) if estaMiGodModeActivado then removeEventHandler ( "onClientPlayerDamage", getLocalPlayer(), cancelEvent ) outputChatBox ( "Has apagado el Godmode.", 255, 0, 0 ) if miActualVehiculo then setVehicleDamageProof ( miActualVehiculo, false ) end else outputChatBox ( "Has ensendido el Godmode.", 0, 255, 0 ) addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), cancelEvent ) if miActualVehiculo then setVehicleDamageProof ( miActualVehiculo, true ) end end end addCommandHandler ( "godmode", agregarGodmode ) Tenias un par de errores, y cambie algunas cositas.
  10. Castillo

    Cbug script

    JR10, if I'm right, Cbug is what TAPL posted, not flying cars, jumping high and so on.
  11. Again stolen my latest exp_system: https://community.multitheftauto.com/ind ... ls&id=2688 https://community.multitheftauto.com/ind ... ls&id=2687
  12. E-mail, I have uploaded a new version of the exp_system, I would download it if I was you. With the new version you can do something like this: addEventHandler("onPlayerWasted",root, function (_,killer) exports.exp_system:addPlayerEXP(killer,5) end) P.S: The killer has to be logged in.
  13. I'm afraid I don't get you, what are you talking about?
  14. --Server Side function setRespawns () for i,v in ipairs(getElementsByType("vehicle")) do local x,y,z = getElementPosition(v) local rx, ry, rz = getElementRotation(v) setVehicleRespawnPosition(v, x, y, z, 0, 0, rz) end end addEventHandler("onResourceStart", resourceRoot, setRespawns) function respawnAllVehicles (thePlayer) for ind,veh in ipairs(getElementsByType("vehicle")) do if isEmpty( veh ) then respawnVehicle(veh) end end end addCommandHandler("respawnall", respawnAllVehicles) function isEmpty( vehicle ) local passengers = getVehicleMaxPassengers( vehicle ) if type( passengers ) == 'number' then for seat = 0, passengers do if getVehicleOccupant( vehicle, seat ) then return false end end end return true end
  15. No problem. P.S: We posted at the same time, nice sync .
  16. No hay de que . P.S: Un ejemplito: local miTabla = { [1] = "Como andas?", [2] = "Todo bien?" } for indice, mensaje in pairs(miTabla) do outputChatBox(tostring(indice) ..": ".. tostring(mensaje)) end
  17. function getPlayerWeapons(player) local weaponsTable = {} for index=0, 13 do local weapon = getPedWeapon(player,index) local ammo = getPedTotalAmmo(player,index) if ammo > 0 then table.insert(weaponsTable, {weapon, ammo}) end end return weaponsTable end Should return a table of weapons (weapon model, ammo).
  18. Mira, te explico, i,v no es nada, ahi pones lo que sea, ejemplo: for lol, lol2 in pairs(myTabla) do print("hola que tal") end Me entendes? no es necesario poner i, v o i, k, lo que sea, pones lo que quieras.
  19. Mira, lo que tenes que hacer es guardar el nombre del equipo, no el elemento. function onQuit (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "equipo", getTeamName(getPlayerTeam ( source ))) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit) function playerLogin (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "equipo") if (accountData) then local equipo = getAccountData (theCurrentAccount, "equipo") setPlayerTeam (source, getTeamFromName(equipo)) end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin)
  20. Castillo

    help plz

    I'd the "hard" part, now you should do the easy part .
  21. call(getResourceFromName("dxscoreboard"), "addScoreboardColumn", "wanted level") addEventHandler("onPlayerWasted",root, function (_,killer) if killer == source then return end setElementData ( killer, "wanted level", 3 ) end) Should give the killer 3 wanted stars.
×
×
  • Create New...