11.12.2011, 07:27
Hi visitors,i have on question,with that code:
And then after onplayerdisconnect:
What i want to do here?I want to do,if player car need remont,then it will save 1 other 0. All is good,all save,but when i load it:
And it no load.I check log,and i see that:
How you see,here is no number...
Код:
stock IsRemont(playerid) { new Query [ 100 ]; format( Query,sizeof( Query ),"SELECT * FROM `RemontCars` WHERE `Owner` = '%s'",PlayerName(playerid)); mysql_query( Query ); mysql_store_result( ); if( mysql_num_rows( )==0 ) { PlayerData[ playerid ][ Remont] = 0; } else if(mysql_num_rows( ) !=0 ) { PlayerData[ playerid ][ Remont] = 1; } mysql_free_result( ); }
Код:
IsRemont(playerid); format(Query, sizeof(Query),"UPDATE `playerdata` SET `Remont` = '%d' WHERE `Name` = '%s'",PlayerData[playerid][Remont],PlayerName(playerid)); mysql_query(Query);
Код:
mysql_fetch_field_row( savingstring, "Remont"); PlayerData[ playerid ][ Remont] = strval(savingstring);
Код:
[10:19:52] >> mysql_fetch_field_row( Connection handle: 1 ) [10:19:52] CMySQLHandler::FetchField("Remont") -