02.11.2018, 19:05
PHP Code:
public TextLocalizado(playerid, giveplayerid)
{
if(IsPlayerConnected(giveplayerid))
{
new giveplayer[78], string[78];
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new Float:x, Float:y, Float:z;
GetPlayerPos(giveplayerid, x, y, z);
new Float:Procurado = GetPlayerDistanceFromPoint(playerid, x, y, z);
TextDrawHideForPlayer(playerid,oficial4);
TextDrawHideForPlayer(playerid,TextLocalizando);
format(string, sizeof(string), "Procurado: %s Distancia: %.2f metros" , giveplayer, Procurado);
TextDrawSetString(TextLocalizando, string);
TextDrawShowForPlayer(playerid,TextLocalizando);
}
else
{
TextDrawHideForPlayer(playerid,TextLocalizando);
TextDrawShowForPlayer(playerid,oficial4);
}
}