03.04.2011, 17:10
this should work i think
yea i didn't used ProxDetector as i don't have it nor i don't like it :P
pawn Код:
if ( !strcmp ( cmdtext , "/b" , true , 2 ) && cmdtext [ 2 ] == ' ' )
{
if ( strlen ( cmdtext ) == 3 )
{
SendClientMessage ( playerid , 0xFF0000FF , "USAGE: /b [local ooc chat]" ) ;
return 1 ;
}
new
plName [ MAX_PLAYER_NAME ] ,
str [ 128 ] ,
Float:p_x,
Float:p_y,
Float:p_z,
ii
;
GetPlayerPos ( playerid , p_x , p_y , p_z ) ;
GetPlayerName ( playerid , plName , MAX_PLAYER_NAME ) ;
format ( str , 128 , "[OOC-Chat] %s: %s" , plName , cmdtext [ 3 ] ) ;
for ( ii = 0 ; ii < MAX_PLAYERSEX ; ii++ )
{
if ( IsPlayerConnected ( ii ) )
{
if ( IsPlayerInRangeOfPoint ( ii , 20 , p_x , p_y , p_z ) )
{
SendClientMessage ( ii , COLOR_FADE1 , str ) ;
}
}
}
return 1;
}