MYSQL Saving
#1

Hi SA-MP,

I started creating a MYSQL account system with ThisTutorial.
My question is, does anybody know how to make a save function?? Because, it looks like this tutorial didn't made a Save part.

I really hope someone knows..

J.J
Reply
#2

example
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new Query[100];
    format(Query,sizeof(Query),"UPDATE `playerdata` SET `money` = '%d', `score` = '%d' WHERE `username` = '%s' ",GetPlayerMoney(playerid),GetPlayerScore(playerid),PlayerName(playerid));
    mysql_query(Query);
    return true;
}
Reply
#3

Quote:
Originally Posted by doreto
Посмотреть сообщение
example
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new Query[100];
    format(Query,sizeof(Query),"UPDATE `playerdata` SET `money` = '%d', `score` = '%d' WHERE `username` = '%s' ",GetPlayerMoney(playerid),GetPlayerScore(playerid),PlayerName(playerid));
    mysql_query(Query);
    return true;
}
Thanks for the fast and helpful reply
Reply
#4

Quote:
Originally Posted by Jari_Johnson*
Посмотреть сообщение
Thanks for the fast and helpful reply
np I'm glad that I help you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)