Jump to content

PicoPr0

Members
  • Posts

    16
  • Joined

  • Last visited

Details

  • Gang
    GCC

PicoPr0's Achievements

Square

Square (6/54)

0

Reputation

  1. here is my stats system 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(attacker) 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 end if not attacker or attacker == source then return 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(), 50, 255, 0) end end addCommandHandler("stats",getPlayerStats) addCommandHandler("st",getPlayerStats) I tested it after every round it says 1 Death more without getting killed . why ?
  2. PicoPr0

    MW2

    Hey did someone have mw2 steam account for me ? I can give admin rights on GTA.ru Stealth
  3. PicoPr0

    TDMA

    Can u please give me a start or script
  4. PicoPr0

    TDMA

    I will make in TDMA a flashbang But I don't know how
  5. How to remove it in Stealth ?
  6. PicoPr0

    Reset Stats

    here is my stats system 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(attacker) 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 if not attacker or attacker == source then return 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(), 50, 255, 0) end end addCommandHandler("stats",getPlayerStats) Now I want the following When a player write /cs (change stats) The stats get set to 0 That's what I tried but it didn't work . 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(), 50, 255, 0) end end addCommandHandler("0",getPlayerStats) Please Help
  7. PicoPr0

    Stats System

    The stats system works. Now i want when u write /cs (change stats) Your stats set to 0 - That is what I made. 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(), 50, 255, 0) end end addCommandHandler("cs",getPlayerStats)
  8. PicoPr0

    Stats System

    That is what I did 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(), 50, 255, 0) end end addCommandHandler("resetstats",getPlayerStats)
  9. PicoPr0

    Stats System

    Example write in chat /resetstats And U'r stats reset 0
  10. PicoPr0

    Stats System

    What ? Thats the same script I have.
  11. PicoPr0

    Stats System

    Can someone help me How to reset stats ?
  12. PicoPr0

    Stats System

    It said statssystem/stats.lu:29 ? ^^
  13. PicoPr0

    Stats System

    Here is the meta "[GCC]Pico" type="script" name="stats system" />
  14. PicoPr0

    Stats System

    I tested it but there was no response when I write /stats
×
×
  • Create New...