01.05.2012, 07:49
Quote:
Por favor, poste a funзгo inteira para yo poder identificar
e limitar carros. |
pawn Код:
public AttVelocidade(playerid)
{
new Float:x,Float:y,Float:z;
new Float:distance,value;
for(new r=0;r<MAX_PLAYERS;r++)
{
if(IsPlayerConnected(r))
{
GetPlayerPos(r, x, y, z);
distance = floatsqroot(floatpower(floatabs(floatsub(x,SalvandoPosP[r][LastX])),2)+floatpower(floatabs(floatsub(y,SalvandoPosP[r][LastY])),2)+floatpower(floatabs(floatsub(z,SalvandoPosP[r][LastZ])),2));
value = floatround(distance * 3600);
if(AttSegundos > 1)
{
value = floatround(value / AttSegundos);
}
Distancia0[r] = floatround(value/1600);
SalvandoPosP[r][LastX] = x;
SalvandoPosP[r][LastY] = y;
SalvandoPosP[r][LastZ] = z;
AddRadar(r, 1250, 1190.4241, -1706.6455, 13.5469, 20, 80); //
AddRadar(r, 1250, -110.3257, -1174.2386, 2.8906, 30, 80); //
AddRadar(r, 1250, 1609.7046, -977.3030, 38.3771, 30, 80); //
AddRadar(r, 1250, 596.0350, -1732.4501, 13.5660, 30, 80); //
AddRadar(r, 1250, 2419.3999, -1808.2952, 13.5469, 30, 80); //
AddRadar(r, 1250, 2674.2661, -1042.2516, 69.5717, 20, 80); //
AddRadar(r, 1250, 2117.4729, -1900.0720, 13.5469, 20, 80); //
AddRadar(r, 1250, 1741.2053, 529.1649, 27.5101, 35, 80); //
}
}
}