12.02.2011, 15:54
Use the code you firstly posted^^, and put
or
At end of your commands. Like:
Or shorter:
But you need to return something else than 0. OnPlayerCommandText will return 0 if you don't put any return upthere.
And for IsPlayerInRangeOfPoint:
pawn Код:
return true;
pawn Код:
return 1;
pawn Код:
CMD:something( playerid, params[ ] )
{
SendClientMessage( playerid, 0xAAAAAA, "BlaBla" );
return 1; // This
}
pawn Код:
CMD:something( playerid, params[ ] )
{
return SendClientMessage( playerid, 0xAAAAAA, "BlaBla" );
}
And for IsPlayerInRangeOfPoint:
pawn Код:
if( IsPlayerInRangeOfPoint( playerid, 5.0, 0.0, 0.0, 0.0 ) )
{
SendClientMessage( playerid, 0xAAAAAA, "You are in range of 5 meters in the position: X: 0.0, Y: 0.0 and Z: 0.0" );
}
else
{
SendClientMessage( playerid, 0xAAAAAA, "You are not in range of 5 meter for the X: 0.0, Y: 0.0 and Z: 0.0" );
}