25.05.2011, 12:25
I make an fuel system and in my system I can buy tanks of fuel, but if I buy it I do that: SetPVarInt(playerid,"Tanks",1); But problem this: I want to save this tanks to mysql but it doesn't. There is my code:
But this code doesn't save to mysql DB... And I have buoght tanks of fuel but it doesn't save it
Please help me with this
Код:
public OnPlayerDisconnect( playerid, reason ) { new tanks[30],pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,sizeof(pName)); if ( Logged[ playerid ] ) { MySQLCheck(); format(tanks,sizeof(tanks),"UPDATE `"TABLENAME"` SET `Tanks`='%d' WHERE (`Name` = '%s')",GetPVarInt(playerid,"Tanks"),pName); mysql_query(tanks); } return 1; }
![Sad](images/smilies/sad.gif)
![Sad](images/smilies/sad.gif)