PlayerToPoint In MysQl Query
#1

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?
Reply
#2

pawn Код:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)