SA-MP Forums Archive
[Ajuda] TextDraw no Radar - 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: [Ajuda] TextDraw no Radar (/showthread.php?tid=481973)



TextDraw no Radar - IgoRangel - 18.12.2013

Galera queria criar um textdraw quando passa no radar mostra !
VELOCIDADE REGISTRADA 20 K/M E Depois sumir pq so apareзe no chat !

public Radar(playerid)
{
new Float:X, Float:Y, Float:Z, Float:Speed;
GetVehicleVelocity(GetPlayerVehicleID(playerid), X, Y, Z);
Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower( X, 2), floatpower(Y, 2)), floatpower(Z, 2))), 100.0);
new velocid;
velocid = floatround(Speed, floatround_floor);
if(IsPlayerInCircle(playerid, 1209.5920,-1712.2078, 20) || IsPlayerInCircle(playerid, 433.3980,596.6035,20) || IsPlayerInCircle(playerid, 1693.2318,-436.2052,20) || IsPlayerInCircle(playerid, 1600.4952,-1453.4578,20) || IsPlayerInCircle(playerid,-139.3475,-1238.0480,20)
||/**/ IsPlayerInCircle(playerid, 1610.3528,-1454.7465, 20) ||/**/ IsPlayerInCircle(playerid, 1405.5986,-939.9647, 20) ||/**/ IsPlayerInCircle(playerid, 1315.4125,-1544.7103, 20) ||/**/ IsPlayerInCircle(playerid, -1220.0536,-778.5842, 20)
|| IsPlayerInCircle(playerid,-138.5938,478.6885,20) || IsPlayerInCircle(playerid,-1653.5514,558.4958,20) || IsPlayerInCircle(playerid,-2272.6135,2667.1377,20) || IsPlayerInCircle(playerid, -2273.7720,2640.0771,20) || IsPlayerInCircle(playerid, -2681.4534,1446.0627,20)
|| IsPlayerInCircle(playerid, -2681.4534,1446.0627,20) || IsPlayerInCircle(playerid, 1702.3224,-1652.2748,20) || IsPlayerInCircle(playerid, -1701.9724,-1652.4778,20)){
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
if(velocid > 85){
if(aradar[playerid] == 0){
SendClientMessage(playerid,Verde,"-----------------------------------------------~> Radar <~--------------------------------------------------------");
TextDrawShowForPlayer(playerid, Flash);
PlayerPlaySound(playerid,1132,0.0,0.0,0.0);
format(gstring, 128," | RADAR | Velocidade Registrada: %iKm/h",velocid);
SendClientMessage(playerid,Amarelo,gstring);
SendClientMessage(playerid,Bordo," | INFO | Vocк foi pego(a) no radar,por estar acima do limite permitido( 85 KM/h)");
SendClientMessage(playerid,Bordo," | INFO | Portanto,vocк foi multado em R$500. Para pagar vб atй o Detran de LV!");
format(gstring, 128," | INFO | No total,vocк tem %d Multas",dini_Int(filena(playerid),"Multas")+1);
SendClientMessage(playerid,AmareloClaro,gstring);
SetTimerEx("flex", 1000, false, "i", playerid);
SendClientMessage(playerid,bege," | INFO | Ao completar 6 multas vocк perdera sua habilitaзao terrestre e pagarб R$7.000!");
dini_IntSet(filena(playerid), "Multas",dini_Int(filena(playerid),"Multas")+1 );
if(dini_Int(filena(playerid),"Multas") >= 6){
PlayerInfo[playerid][pHabTerrestre] = 0;
dini_IntSet(filena(playerid),"SaldoBancario",dini_ Int(filena(playerid),"SaldoBancario")-7000);
dini_IntSet(filena(playerid),"Multas",0);
SendClientMessage(playerid,AmareloClaro," | INFO | Vocк completou 6 multas sem pagar, perdeu sua habilitaзгo e pagou R$7.000!");
}
SendClientMessage(playerid,Verde,"-----------------------------------------------~> Radar <~--------------------------------------------------------");
aradar[playerid] = 1;
}
} else {
if(aradar[playerid] == 0){
format(gstring, 256," | RADAR | Velocidade Registrada: %iKm/h",velocid);
SendClientMessage(playerid,AmareloClaro,gstring);
aradar[playerid] = 1;
}
}
}
} else aradar[playerid] = 0;
}


Re: TextDraw no Radar - ZaturN - 18.12.2013

Mude isto:
PHP Code:
TextDrawShowForPlayer(playeridFlash);
PlayerPlaySound(playerid,1132,0.0,0.0,0.0);
format(gstring128," | RADAR | Velocidade Registrada: %iKm/h",velocid);
SendClientMessage(playerid,Amarelo,gstring); 
Para isto:
PHP Code:
TextDrawShowForPlayer(playeridFlash);
PlayerPlaySound(playerid,1132,0.0,0.0,0.0);
format(gstring128," | RADAR | Velocidade Registrada: %iKm/h",velocid);
GameTextForPlayer(playeridgstring60001); 
_____________________________

Mude isto
PHP Code:
if(aradar[playerid] == 0){
format(gstring256," | RADAR | Velocidade Registrada: %iKm/h",velocid);
SendClientMessage(playerid,AmareloClaro,gstring);
aradar[playerid] = 1
Para isto:
PHP Code:
if(aradar[playerid] == 0){
format(gstring256," | RADAR | Velocidade Registrada: %iKm/h",velocid);
GameTextForPlayer(playeridgstring60001);
aradar[playerid] = 1
@NГO TESTEI, CASO NГO FOR ME AVISE