02.01.2011, 12:04
Hello everyone. I have a problem you see I want to do to check whether the player is located at a distance of 2.0 from the position set in the mysql table. And I have a question how to create such a query?
stock
SomeFunc( playerid )
{
new
string[ 80 ],
Float: x, Float: y, Float: z;
mysql_query( "SELECT `x`, `y`, `z` FROM `sometable`" );
mysql_store_result( );
if ( mysql_fetch_row( string ) )
{
sscanf( string, "p<|>fff", x, y, z );
if ( IsPlayerInRangeOfPoint( playerid, 2.0, x, y, z ) )
return true;
else
return false;
}
else
print ( "Query failed." );
return false;
}