15.05.2011, 00:51
PHP код:
stock SafeGivePlayerMoney( playerid, cash )
{
PlayerInfo[ playerid ][ pCash ] += cash;
return 1;
}
PlayerToPoint( Float:radius, playerid, Float:X, Float:Y, Float:Z )
{
new Float:oldpos[ 3 ], Float:temppos[ 3 ];
GetPlayerPos( playerid, oldpos[ 0 ], oldpos[ 1 ], oldpos[ 2 ] );
temppos[ 0 ] = ( oldpos[ 0 ] -X );
temppos[ 1 ] = ( oldpos[ 1 ] -Y );
temppos[ 2 ] = ( oldpos[ 2 ] -Z );
if( ( ( temppos[ 0 ] < radius ) && ( temppos[ 0 ] > -radius ) ) && ( ( temppos[ 1 ] < radius ) && ( temppos[ 1 ] > -radius ) ) && ( ( temppos[ 2 ] < radius ) && ( temppos[ 2 ] > -radius ) ) )
{
return true;
}
return false;
}