25.08.2017, 17:09
Hi, Please write my script mysql r41-2 plugin. Thank You!:
)
)Код:
stock IsRegPlateUsed(plate[])
{
mysql_format(conn, mquery, sizeof(mquery), "SELECT id FROM vehicles WHERE RegPlate='%e' LIMIT 1", plate);
new Cache:result = mysql_query(conn, mquery);
if(cache_num_rows() == 0)
{
cache_delete(result);
mysql_format(conn, mquery, sizeof(mquery), "SELECT id FROM fveh WHERE RegPlate='%e' LIMIT 1", plate);
new Cache:result2 = mysql_query(conn, mquery);
if(cache_num_rows() == 0)
{
cache_delete(result2);
for(new i = 0; i < MAX_SERVER_CARS; i++)
{
if(strmatch(RandomDriverData[i][1], plate))
{
return true;
}
}
return false;
}
}
return true;
}

