Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Well.. you'll need to store the kills, deaths, headshots somewhere and then make a simple script to get them & the ratio. This should be a good start: addEventHandler("onPlayerLogin",getRootElement(), function () local account = getPlayerAccount(source) local kills = getAccountData(account,"kills") local deaths = getAccountData(account,"deaths") local headshots = getAccountData(account,"headshots") if not kills then setAccountData(account,"kills",0) end if not deaths then setAccountData(account,"deaths",0) end if not headshots then setAccountData(account,"headshots",0) end end) function updatePlayerStats(ammo, attacker, weapon, bodypart) local account = getPlayerAccount(killer) if account then local kills = getAccountData(account,"kills") local headshots = getAccountData(account,"headshots") setAccountData(account,"kills",kills+1) if bodypart == 9 then setAccountData(account,"headshots",headshots+1) end end local accountS = getPlayerAccount(source) if accountS then local deaths = getAccountData(accountS,"deaths") setAccountData(accountS,"deaths",deaths+1) end end addEventHandler("onPlayerWasted",getRootElement(),updatePlayerStats) function getPlayerStats(thePlayer) local account = getPlayerAccount(thePlayer) if account then local kills = getAccountData(account,"kills") or 0 local headshots = getAccountData(account,"headshots") or 0 local deaths = getAccountData(account,"deaths") or 0 local ratio = string.format("%.2f", kills / deaths) outputChatBox("[sTATS]".. getPlayerName(thePlayer) .."'s Stats: Kills: ".. tostring(kills) .." (".. tostring(headshots) .." Headshots), ".. tostring(deaths) .." Deaths, Ratio: ".. tostring(ratio).."", getRootElement(), 255, 255, 0) end end addCommandHandler("stats",getPlayerStats)
  2. function st3reo7 (thePlayer, commandName) for i,v in pairs(getElementsByType("player")) do if isPedInVehicle(v) and getElementData(v,"state") == "alive" then local vehicle = getPedOccupiedVehicle(v) local x, y, z = getElementPosition ( vehicle ) local rx, ry, rz = getVehicleRotation ( vehicle ) local stereo = createObject ( 3080, x, y, z, rx, ry, rz ) attachElements ( stereo, vehicle, 0, 4, -1, 0, 0, 180 ) outputChatBox( getPlayerName(thePlayer).. " Give Ramp " ..getPlayerName(v), getRootElement(), 255, 255, 0, true) end end end addCommandHandler("ramp", st3reo7)
  3. He's talking about the freeroam resource, change this on fr_client.lua. nonAllowedSkins = {[211] = true, [217] = true} function setSkinCommand(cmd, skin) skin = skin and tonumber(skin) if skin then if not nonAllowedSkins[skin] then server.setMySkin(skin) fadeCamera(true) closeWindow(wndSpawnMap) closeWindow(wndSetPos) else errMsg( "You are not allowed to use this skin." ) end end end addCommandHandler('setskin', setSkinCommand) addCommandHandler('ss', setSkinCommand) I think it should work.
  4. Pero aprender es bueno, ya que en el futuro (o en el presente) podes llegar a ganar dinero P.S: Carlos, yo ayudo a los que me piden ayuda en MSN, Mensajes privados y todo eso, siempre intento explicarles lo mejor que puedo, pero algunos no tienen intencion de aprender y te dan un ejemplo de la wiki y te dicen que no anda y que agas algo totalmente diferente al ejemplo, a esos no los ayudo claro esta, o les doy una iniciativa, ademas... que yo sepa tengo buena reputation, sino no me pedirian ayuda a cada momento, yo diria.
  5. I think you got alot of questions answered already, start learning LUA if you want to "improve" your server. https://wiki.multitheftauto.com/wiki/Scr ... troduction
  6. Stolen resources: https://community.multitheftauto.com/ind ... ls&id=2209 -- GUIEditor (1) https://community.multitheftauto.com/ind ... ls&id=2208 -- Bank (1) https://community.multitheftauto.com/ind ... ls&id=2207 -- Speedometer (1) Vehicle mod: https://community.multitheftauto.com/ind ... ls&id=2211
  7. Type in the server console (black window): start . Or, if you are logged in as admin in-game, use /start .
  8. hm ={ jaja = "jo" } function lolo()if hm.jaja == hm["jaja"] then return true end end I have tested this and yes, indeed returns true.
  9. John, that resource only works to read the registry.db, you'll need to use the SQLITEbrowser program instead to open internal.db. http://sourceforge.net/projects/sqlitebrowser/
  10. I have told him that already CowTurbo, he has done two topics asking the same, but in different sections. I think the case is closed.
  11. You have my permission to use any part of my Shop resource .
  12. Go to your modem/router page and open them, to know how to do that go to: portforward.com
  13. Open the ports required. And then check if they are correctly open here: https://nightly.multitheftauto.com/ports/
  14. Remove the IP from the mtaserver.conf.
  15. Remove the IP from the mtaserver.conf.
  16. I didn't forgot anything, that's an example
  17. Danny, Interstate 69 is a public game mode, he doesn't need to ask anything.
  18. Actually, the numpad works with /bind command too, but you need to do /bind num_1 say hello world. Anyway, i made a small script to do /addbind and /delbind , the binds are saved in player's serial. Link to it: http://www.mediafire.com/?18j66reh9i8ocbb
  19. Fixed, thanks for reporting it.
  20. Castillo

    KickPlayer

    So, you don't have the resource at the Group Admin, right? if so, add it there too.
  21. Pues, la verdad no me gusta ayudar a la gente que no quiere aprender, si queres editar los scripts debes saber lo basico.
  22. Castillo

    KickPlayer

    AdminCommand["kick"]=5 function kick ( thePlayer,commandName,ziel,... ) local kickn = table.concat( kickw, " " ) if isAdmin( thePlayer, AdminCommand[string.lower(command)] ) then local kicked = getPlayerFromName ( ziel ) kickPlayer( kicked, kickn) else outputChatBox( "Du hast nicht das Recht dazu!", thePlayer ) end end addCommandHandler ( "kick", kick )
  23. Castillo

    KickPlayer

    Have you added the resource to the acl.xml? kickPlayer requires admin powers to be used.
  24. New C-panel version has been uploaded! Go get the latest version and report any bug if you can, thanks.
  25. , no hay un link que diga: "aca es para saber editarlo" , tenes que saber lo basico de LUA, luego abres el script buscas lo que quieres borrar y listo.
×
×
  • Create New...