[pawn]else if ( strcmp( cmd, "!loc", true ) == 0 )
{
tmp = strtok( cmdtext, idx );
if ( !strlen( tmp ) )
{
format( szMsg, sizeof( szMsg ), "Locacion %s: %s", gPlayers[ playerid ], GetPlayerLocation( playerid ) );
SendClientMessageToAll( BLUE, szMsg );
}
else
{
new plr = FindPlayerIDFromString( tmp );
if ( plr == INACTIVE_PLAYER_ID )SendClientMessage ( playerid, RED, "Error: Unknown player" );
else if ( PlayerInfo[ plr ][ NoLoc ] == 1 )
{
format( szMsg, sizeof( szMsg ), "%s localizar desactivado.", gPlayers[ plr ] );
SendClientMessage( playerid, COLOR_GREEN, szMsg );
}
else
{
format( szMsg, sizeof( szMsg ), "Locacion %s: %s", gPlayers[ plr ], GetPlayerLocation( plr ) );
SendClientMessageToAll( BLUE, szMsg );
}
}
return 1;
}
return 1;
}[/pawn]