19.05.2015, 03:54
It might be to with the fact that it's 5am and I'm missing something aha!
I have this Under OnPlayerEnterVehicle, if the number of rows == 1 then it displays correctly, if the number of rows are above 1, it does not display at all. Why might this be?
Thanks in advance.
I have this Under OnPlayerEnterVehicle, if the number of rows == 1 then it displays correctly, if the number of rows are above 1, it does not display at all. Why might this be?
Thanks in advance.
pawn Код:
if(VehicleSQLID[vehicleid] > 0)
{
if(VehOwner[vehicleid] == PlayerSQLID[playerid])
{
new query[256], string[256];
format(query, sizeof(query), "SELECT * FROM `ptickets` WHERE `VehID` = %d", VehicleSQLID[vehicleid]);
mysql_query(query);
mysql_store_result();
new rows = mysql_num_rows();
printf("ROWS %d", rows);
if(rows == 1)
{
format(string, sizeof(string), "This vehicle has an "COL_RED"outstanding"COL_WHITE" parking ticket to be paid, please visit a police station to view/pay your parking tickets.");
SendClientMessage(playerid, COLOUR_WHITE, string);
}
if(rows > 1)
{
format(string, sizeof(string), "This vehicle has a total of "COL_BLUE"%d "COL_RED"outstanding"COL_WHITE" parking tickets to be paid, please visit a police station to view/pay your parking tickets.", rows);
SendClientMessage(playerid, COLOUR_WHITE, string);
}
}
}
return 1;
}