MYSQL CODE TO SAVE STATS?
#1

What is CODE to save player stats?
Reply
#2

I made a tutorial about this, click here:

[SYE] Mysql Register/Load/Save Player System

Glad to help =)
Reply
#3

Quote:
Originally Posted by jeffery30162
Посмотреть сообщение
I made a tutorial about this, click here:

[SYE] Mysql Register/Load/Save Player System

Glad to help =)
Thanks...In this case loading works for me,but saving not..Should i just place saving code ?
Reply
#4

Depending on the SQL you use, it all depends on the code you should be using.

The query should be:

pawn Код:
mysql_format(DB_CON, query, sizeof(query), "UPDATE `players` SET `Age`=%d WHERE `ID`=%d", PlayerInfo[playerid][pAge], PlayerInfo[playerid][pAccountID]);
mysql_tquery(DB_CON, query);
Reply
#5

Quote:
Originally Posted by iGetty
Посмотреть сообщение
Depending on the SQL you use, it all depends on the code you should be using.

The query should be:

pawn Код:
mysql_format(DB_CON, query, sizeof(query), "UPDATE `players` SET `Age`=%d WHERE `ID`=%d", PlayerInfo[playerid][pAge], PlayerInfo[playerid][pAccountID]);
mysql_tquery(DB_CON, query);
Where i put that code bro?Im not into samp scripting to much.Thanks
Reply
#6

pawn Код:
// Setup local variables
    new query[200], ban_query[200], playerName[24], playersName[24], playersIP[16];
    GetPlayerName(playerid, playerName, 24);

    format(query, sizeof(query), "SELECT `playerName` FROM `playerdata` WHERE playerName = '%s' LIMIT 1", playerName);
    mysql_query(query, MYSQL_RESULT_CHECK, playerid, connection);

    GetPlayerName(playerid, playersName, sizeof(playersName));
    GetPlayerIp(playerid, playersIP, sizeof(playersIP));

I think this is my saving section....not sure :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)