08.12.2018, 11:29
Esta definido assim!
a stock CheckRadar nгo e chamada!
PHP код:
new Float:Radares[1][4] =
{
{1212.5142,-1719.8408,13.5469, 19.1700}
};
PHP код:
forward Radar();
public Radar()
{
for(new i; i < GetPlayerPoolSize(); i++)
{
for(new r; r < MAX_RADAR; r++)
{
CheckRadar(i, Radares[r][0], Radares[r][1], Radares[r][2], 7.0, 60);
}
}
return 1;
}
PHP код:
stock CheckRadar(playerid, Float:rX, Float:rY, Float:rZ, Float:rRadius, speed)
{
new SpeedRegistred = GetVehicleSpeed(playerid), string[150], string2[150];
printf("O player %s passou no radar!", Pname(playerid));
if(IsPlayerInRangeOfPoint(playerid, rRadius, rX, rY, rZ))
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(SpeedRegistred > speed)
{
format(string, sizeof(string), "{1E90FF}[ PB ]O radar registrou uma infraзгo de velocidade! Permitida: %d | Registrada: %d!", speed, SpeedRegistred);
format(string2, sizeof(string2), "{1E90FF}[ PB ]A multa foi automaticamente registrada e colocada em sua carteira! MULTA: %d!", SpeedRegistred*4);
GivePlayerMoney(playerid, -SpeedRegistred*4);
SendClientMessage(playerid, -1, string);
SendClientMessage(playerid, -1, string2);
}
else if(SpeedRegistred <= speed )
{
format(string, sizeof(string), "{1E90FF}[ PB ]O radar registrou a velocidade de %d | Permitida: %d!", SpeedRegistred, speed);
SendClientMessage(playerid, -1, string);
}
}
}
return 1;
}