24.03.2014, 19:12
This only sets the arrested = 1 for the last table it dealt with.
Where it retrieves.
Could anyone assist me?
pawn Код:
format(query, sizeof(query), "UPDATE `arecords` SET arrested = 1 WHERE id = %d", PlayerArrests[giveplayerid][ar_id]);
mysql_query(query);
pawn Код:
format(string, sizeof(string), "SELECT * FROM `arecords` WHERE `PSQLID`= %d AND `Arrested`=0", PlayerSQLID[giveplayerid]);
mysql_query(string);
mysql_store_result();
new r_msg[500];
new totaltime = 0;
//while(mysql_fetch_row(r_msg, "|"))
while(mysql_fetch_row(r_msg))
{
sscanf(r_msg, "p<|>e<iiiis[24]ii>", PlayerArrests[giveplayerid]);
totaltime += PlayerArrests[giveplayerid][ar_ti]; //same here, you'll have to change it to the fieldname that says how long he should be arrested for THAT ONE crim
}
Could anyone assist me?