[Pedido] Procurados! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Procurados! (
/showthread.php?tid=360790)
[Pedido] Procurados! -
The_G0dFather - 18.07.2012
Bom quando uma pessoa for procura ficar escrito em cima dela "Procurado. Level: %"
Aqui estarб o comando /procurados para pegar variбveis.
pawn Код:
//>-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
if(strcmp(cmd, "/procurados", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um policial!");
return true;
}
if(OnDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo Bateu o cartгo!");
return true;
}
new x;
SendClientMessage(playerid, COLOR_WHITE, "|______________[ Suspeitos ]______________|");
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(WantedPoints[i] > 0)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "%s%s(%d): %d", string,giveplayer,i,WantedPoints[i]);
x++;
if(x > 3)
{
SendClientMessage(playerid, COLOR_YELLOW, string);
x = 0;
format(string, sizeof(string), "");
}
else
{
format(string, sizeof(string), "%s, ", string);
}
}
}
}
if(x <= 3 && x > 0)
{
string[strlen(string)-2] = '.';
SendClientMessage(playerid, COLOR_YELLOW, string);
}
}
return true;
}
Re: [Pedido] Procurados! -
.FuneraL. - 18.07.2012
Use Create3DTextLabel+Attach3DTextLabelToPlayer
Re: [Pedido] Procurados! -
The_G0dFather - 18.07.2012
Cara realmente sou novato se puder ajudar...
Re: [Pedido] Procurados! -
darkxdll - 18.07.2012
Usa ai :
pawn Код:
new Text3D:procurado = Create3DTextLabel("~x PROCURADO x~", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
if(WantedPoints(playerid)>=1)
{
Attach3DTextLabelToPlayer(Text3D:procurado,playerid,0.0,0.0,0.7);
}
if(WantedPoints(playerid)==0)
{
Delete3DTextLabel(Text3D:procurado);
}
Nгo sei como й a parte de aparecer o level de procurado , nem sei sй seria possнvel fazer uma coisas dessas em Text3D ... Mais usa ai /\
Re: [Pedido] Procurados! -
Victor' - 18.07.2012
pawn Код:
new Text3D:label[MAX_PLAYERS], cProcurado[MAX_PLAYERS];
forward ChecarProcurado(playerid);
public OnPlayerConnect(playerid)
{
label[playerid] = Create3DTextLabel("** Procurado **", 0x008080FF, 30.0, 40.0, 50.0, 60.0, 0);
cProcurado[playerid] = SetTimerEx("ChecarProcurado", 1000, true, "i");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
KillTimer(cProcurado[playerid]);
Delete3DTextLabel(label[playerid]);
return 1;
}
public ChecarProcurado(playerid)
{
if(WantedPoints[playerid] > 0)
{
static str[80];
format(str, sizeof(str), "** Procurado %d **", WantedPoints[playerid]);
Update3DTextLabelText(label[playerid], 0x008080FF, str);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
}
else
{
Update3DTextLabelText(label[playerid], 0x008080FF, "");
}
return 1;
}