Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Score not updating (Mysql)

$
0
0
So for some reason the score of a player wont update to mysql:
PHP Code:

public OnPlayerDisconnect(playeridreason)
{
    new
        
query[128],
        
Float:pos[4],
        
name[24],
        
score;

    
GetPlayerPos(playeridpos[0], pos[1], pos[2]);
    
GetPlayerFacingAngle(playeridpos[3]);
    
GetPlayerName(playeridname24);
    
GetPlayerScore(playeridPlayer[playerid][Score]);
    
mysql_format(mysqlquerysizeof(query), "UPDATE `accounts` SET `Money` = %d, `PosX` = %f, `PosY` = %f, `PosZ` = %f, `PosA` = %f WHERE `ID` = %d",
    
GetPlayerMoney(playerid), pos[0], pos[1], pos[2], pos[3], Player[playerid][ID]);
    
mysql_format(mysqlquerysizeof query"UPDATE 'accounts' SET 'Score' = '%i' WHERE 'Name' = '%s'"scorename);
    
mysql_tquery(mysqlquery"""");

    return 
true;


Could you help me out?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>