My check account with mysql dosen't work
#8

Complications, complications and complications... First of all, UPDATE only pos X , pos Y and pos Z on disconnect. Things like level , donate rank etc UPDATE when it changes. Second: Why do you need that type? Save it normally, like the God commands! Third, look at my codes below ----

pawn Код:
SaveAccount(playerid)
{
      new Query[ 300 ];
      mysql_format(MySQLHandle, Query, sizeof(Query), "UPDATE  users SET  SKILL_M4  = %d,  SKILL_SNIPERRIFLE  = %d WHERE  IDPlayer  = %d", PlayaInfo[ playerid ][ SKILL_M4 ], PlayaInfo[ playerid ][ SKILL_SNIPERRIFLE ], PlayaInfo[ playerid ][ IDPlayer  ]);
      mysql_tquery(MySQLHandle, Query);
      //...
}
Extra notes: When you are updating, just use mysql_tquery(Handle, Query); , there is no need for callbacks. Use callbacks when you are SELECTing or INSERTing.


cache_num_rows()


pawn Код:
forward OnAccountCheck(playerid);
public OnAccountCheck(playerid)
{

    if(cache_num_rows())
    {
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)