-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
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)
-
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)
-
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.
-
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.
-
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
-
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
-
Type in the server console (black window): start . Or, if you are logged in as admin in-game, use /start .
-
hm ={ jaja = "jo" } function lolo()if hm.jaja == hm["jaja"] then return true end end I have tested this and yes, indeed returns true.
-
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/
-
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.
-
You have my permission to use any part of my Shop resource .
-
Go to your modem/router page and open them, to know how to do that go to: portforward.com
-
Open the ports required. And then check if they are correctly open here: https://nightly.multitheftauto.com/ports/
-
Remove the IP from the mtaserver.conf.
-
Remove the IP from the mtaserver.conf.
-
I didn't forgot anything, that's an example
-
Danny, Interstate 69 is a public game mode, he doesn't need to ask anything.
-
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
-
Fixed, thanks for reporting it.
-
So, you don't have the resource at the Group Admin, right? if so, add it there too.
-
Pues, la verdad no me gusta ayudar a la gente que no quiere aprender, si queres editar los scripts debes saber lo basico.
-
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 )
-
Have you added the resource to the acl.xml? kickPlayer requires admin powers to be used.
-
New C-panel version has been uploaded! Go get the latest version and report any bug if you can, thanks.
-
, 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.
