29.12.2010, 13:10
Correct me if i'm wrong, but I think this is not possible in pawn. You should try something like this:
pawn Код:
GetRegionName(Float:x,Float:y,result[])
{
new query[128];
format(query,sizeof(query),"SELECT regionMain,regionSub FROM samp_regions WHERE regionOLX<='%f' AND regionURX>='%f' AND regionURY<='%f' AND regionOLY>='%f' LIMIT 1;",x,x,y,y);
mysql_query(query, -1, -1, MySQLConnection);
mysql_store_result(MySQLConnection);
if(mysql_num_rows(MySQLConnection) > 0)
{
mysql_fetch_row(result,"|",MySQLConnection);
}
return 1;
}
pawn Код:
new result[35];
GetRegionName(0,5,result);