Jump to content

[HELP]Doesn't look other people /st


mremin

Recommended Posts

function stats(psource,cname,tplayer) 
    if not getPlayerFromName(tplayer) then tplayer = psource else tplayer = getPlayerFromName(tplayer) end 
    achUnlockedNumber(tplayer) 
    local serial = getPlayerSerial(tplayer) 
    local RaceAttempts = executeSQLSelect ( "RaceAttempts", "RaceAttempts","serial = '" .. serial .. "'") 
    local DDAttempts = executeSQLSelect ("DDDM","DDAttempts","serial = '" .. serial .. "'") 
    local DDWins =executeSQLSelect ( "DDDM", "DDWins","serial = '" .. serial .. "'") 
    local Wins1 = executeSQLSelect ( "RaceWins", "RaceWins","serial = '" .. serial .. "'") 
    local Money = executeSQLSelect ( "MoneyB", "Money","serial = '" .. serial .. "'") 
    local MoneyB = executeSQLSelect ( "MoneyB", "B","serial = '" .. serial .. "'") 
    if tonumber(RaceAttempts[1]['RaceAttempts']) == 0 then ratio = 0 else ratio = (tonumber(Wins1[1]['RaceWins'])/tonumber(RaceAttempts[1]['RaceAttempts']))*100 end     
    if tonumber(DDAttempts[1]['DDAttempts']) == 0 then rratio = 0 else rratio = (tonumber(DDWins[1]['DDWins'])/tonumber(DDAttempts[1]['DDAttempts']))*100 end 
     
    outputChatBox(getPlayerName(tplayer).."'s Stats: Attempted: "..RaceAttempts[1]['RaceAttempts'].." races, "..DDAttempts[1]['DDAttempts'] 
    .." DDs. Won: "..Wins1[1]['RaceWins'].." races("..ratio.."%), "..DDWins[1]['DDWins'].." DDs("..rratio.."%). Cash: $"..Money[1]['Money'].. 
    " Unlocked "..getElementData(tplayer,"data.Achnum").."/9 Achievements("..MoneyB[1]['B'].."B)",root,173,218,068) 
  
end 
addCommandHandler("stats",stats) 
addCommandHandler("st",stats) 

I see only own stats.How can I do /stats name command.

I'm sorry English is bad

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...