Jump to content

sylver

Members
  • Content Count

    38
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sylver

  • Rank
    Rat
  1. sylver

    Save To Mysql

    I did already write in a mysql database. But now my question is how do I read? Saving made as follows: local function savePlayer( player ) if not player then for key, value in ipairs( getElementsByType( "player" ) ) do savePlayer( value ) end else if isLoggedIn( player ) then -- save character since it's logged in local sw22 = getPlayerPkt1(player) local x, y, z = getElementPosition( player ) exports.sql:query_free( "UPDATE characters SET money = " .. getPlayerMoney( player ) .. ", pkt = ".. sw22..",
  2. sylver

    Save To Mysql

    Downloading statistics such code: function getPlayerPkt(player) if isElement(player) then local pkt = getElementData(player,"Pkt") if tonumber(pkt) then return tonumber(pkt) else return tonumber(0) end else return tonumber(0) end end
  3. sylver

    Save To Mysql

    What do you want me to say? I made a script to show money in the scoreboard I after reconnect is: is 0 cash in scoreboard and I'm have 21 ...
  4. sylver

    Save To Mysql

    Hello. I want to do to save some data from mysql I did so, however, do not save local function savePlayer( player ) if not player then for key, value in ipairs( getElementsByType( "player" ) ) do savePlayer( value ) end else if isLoggedIn( player ) then -- save character since it's logged in local x, y, z = getElementPosition( player ) exports.sql:query_free( "UPDATE characters SET money = " .. getPlayerMoney( player ) .. ", karne = ".. getPlayerPkt(value)..", rotation = " .. getPedRotation( player ) ..
  5. Problem był w tym że konto test nie było dodane w accounts.xml a: $settings['mta_port'] = 22126; To Port od http
  6. Pisze Tak: The connection with the MTA Server is lost. Please wait while the system is trying to reconnect... Czyli nie potrafi połączyć się z serwerem
  7. Hello. I would like to make a script that for example, how is it 25 wins gets like $ 1000 or 1 point of reputation. When I did this: if getAccountData (playeraccount, "SW ") == 1 then setAccountData (player, "Rep","2") Jumped Error Bad argument @ 'GetAccountData'
  8. Dzięki teraz zadziałało. A mam jeszcze pytanie ściągnąłem Dashboard z community wgrałem to na serwer i na www, powpisywałem dane lecz piszę że nie działa <?php //settings.php //settings for the source. $settings['mta_host'] = "62.75.141.161"; //The location without the HTTP port of your server. $settings['mta_port'] = 22126; $settings['admin_user'] = "test"; //An user with web acces on the SERVER. $settings['admin_pass'] = "test"; //The password for the user. ?> Użytkownik test ma dostęp do uprawnień admina.
  9. Spróbowałem tym 1 sposobem. Zrobiłem wszystko jak pisało typ gry itd itp, jednak nie pobiera danych ani nic bo jest błąd server 1 The server did not respond within the specified time. Taki mam kod na połączenie w example.php: 'server 1' => array('mtasa', '62.75.141.161', '22003')
  10. Witam wszystkich. Chciałbym się dowiedzieć jak mógłbym zrobić listę teamów oraz listę graczy pobieraną z serwera mta na stronę www ? Jeżeli chodzi o Php sdk to słabo mi w tym idzie więc prosiłbym o pomoc.
  11. sylver

    Problem

    Hey, I want to do on the server list with the number of players and teams. I know that this can be done using php sdk but I do not understand! Please help
  12. I also do not work it too much ... Please help my settings.php <?php //settings.php //settings for the source. $settings['mta_host'] = "********"; //The location without the HTTP port of your server. $settings['mta_port'] = 22008; $settings['admin_user'] = "test"; //An user with web acces on the SERVER. $settings['admin_pass'] = "test"; //The password for the user. ?>
  13. No trudno . Ej a jest jakiś sposób żeby na www wyświetlało ilość graczy team itd ?
  14. I co każdy będzie mieć to samo ? Czy będzie musiał sam wgrywać ?
×
×
  • Create New...