Jump to content

Klesh

Members
  • Posts

    306
  • Joined

  • Last visited

  • Days Won

    1

Klesh last won the day on July 21 2022

Klesh had the most liked content!

Details

  • Location
    Los Santos
  • Occupation
    Student
  • Interests
    Scripter, and gamer

Klesh's Achievements

Prankster

Prankster (22/54)

2

Reputation

  1. Klesh

    MTA Server Hosting

    In my country, the only way to change it or convert it's with the state and it's limited money for year, don't works, thanks for the help. If i do it directly the change it's a lot, more than twice.
  2. I'm looking for a MTA hosting in Venezuela, where i can pay with the local money, venezuela servers disappeared, thanks in any advice!
  3. Klesh

    Data Return ?

    I know the code its fine, time ago was working but now its not.
  4. Klesh

    Data Return ?

    Yes, it shows the correct amount of money, the scoreboard only shows the money when the player login, when map change it returns to 0.
  5. Klesh

    Data Return ?

    No works, every time the map starts again it returns to 0
  6. Klesh

    Data Return ?

    When the maps start again, in race, the cash in the scoreboard returns to 0 and is not getting the current!
  7. With that you only are setting the score name without data, he wants to show the location of the player in the map.
  8. Klesh

    Data Return ?

    Hello this code not works as well, when the map loads or player spawn the data is 0 again, how it can check this data some every time ? i tried but nothing, here is the try: localPlayer = getLocalPlayer() function addColumns() exports.scoreboard:scoreboardAddColumn("Money") setElementData(localPlayer,"Money",0) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), addColumns) function updateScoreboardMoney() local money = getPlayerMoney(localPlayer) setElementData(localPlayer,"Money",tonumber(money)) end setTimer(updateScoreboardMoney,1000,0)
  9. Klesh

    Check data

    I fix it by my own, thanks anyways to everyone!
  10. Klesh

    Check data

    Now doesn't work when someone wins, and is the same, onPlayerlogin doesn't show the data, i try to fix it but nothing!
  11. Klesh

    Check data

    How i can save this data ? addEvent( 'onPlayerRaceWasted',true ) addEvent( "stats", true ) exports[ 'scoreboard' ]:addScoreboardColumn( 'Wins' ) --exports[ 'scoreboard' ]:addScoreboardColumn( 'Deaths' ) --exports[ 'scoreboard' ]:addScoreboardColumn( 'ratio' ) local restriction = { } function restrictionEnd( playerName ) restriction[ playerName ] = nil end function publicstatsinfo( ) if isElement( source ) then local account = getPlayerAccount( source ) if account then if isGuestAccount( account ) then return end local askdname = getPlayerName( source ) local wins = getAccountData( account, "Wins" ) or 0 local loses = getAccountData( account, "Deaths" ) or 0 if loses and wins then --outputChatBox("#FFA824*" .. askdname .. " won " .. tostring( wins ) .. " times and he lost " ..tostring( loses ).. " times, his ratio is " .. tostring( ratio ) .. "%", root, 255, 12, 15, true) end end else outputChatBox( "Error source is not player" ) end end function DestructionWin( vehicle ) local alivePlayers = getAlivePlayers( ) if #alivePlayers == 1 then if isElement( alivePlayers[1] ) then local account = getPlayerAccount( alivePlayers[1] ) if isGuestAccount( account ) then return end local count = tonumber( getAccountData( account,"Wins" ) ) or 0 setAccountData( account,"Wins",count ) setElementData( alivePlayers[1],'Wins', count ) --outputChatBox ( "#FFA824The player " .. getPlayerName( alivePlayers[1] ) .. " won!", root, 255, 255, 255, true ) end else local account = getPlayerAccount( source ) if isGuestAccount( account ) then return end local loses = tonumber( getAccountData( account,"Deaths" ) or 0 ) + 1 setAccountData( account,"Deaths", loses ) setElementData( source,'Deaths', loses ) end end function onPlayerLogin ( _, acc ) if ( acc ) then local wins = tonumber ( getAccountData ( account, "Wins" ) ) or 0 setElementData ( source, "Wins", wins ) end end addEventHandler ( "onPlayerLogin",root, onPlayerLogin ) addEventHandler( "stats", root, publicstatsinfo ) addEventHandler( "onPlayerRaceWasted", root,DestructionWin )
  12. Klesh

    Check data

    It works but if the player has 20 wins and he/she login the data is 0 no 20, at least if he wins when the map finish!
  13. Klesh

    Check data

    In fact, this resolves something about this? when the player joins show the wins he/she have, its empty.
×
×
  • Create New...