17.05.2018, 00:06
galera tem um sistema de radar no gm que uso ( play Slayers ) ele cria o radar tudo certinho só que quando passa nele acima da velocidade nao acontece nada alguem sabe me dizer o que pode ser?
codigo:
essa parte mesmo do
nem aparece la no radar
codigo:
PHP Code:
static stock CreateRadars()
{
new objj;
objj = CreateDynamicObject(18880, 722.32, -1764.64, 13.36, 0.00, 0.00, 73.01);
GetDynamicObjectPos(objj,RadarInfo[0][R_X], RadarInfo[0][R_Y], RadarInfo[0][R_Z]);
RadarInfo[0][R_Velo] = 125;
objj = CreateDynamicObject(18880, 397.18, -1709.21, 7.60, 0.00, 0.00, 264.28);
GetDynamicObjectPos(objj,RadarInfo[1][R_X], RadarInfo[1][R_Y], RadarInfo[1][R_Z]);
RadarInfo[1][R_Velo] = 125;
objj = CreateDynamicObject(18880, 1193.89, -1719.65, 12.43, 0.00, 0.00, 92.51);
GetDynamicObjectPos(objj,RadarInfo[2][R_X], RadarInfo[2][R_Y], RadarInfo[2][R_Z]);
RadarInfo[2][R_Velo] = 85;
objj = CreateDynamicObject(18880, 1291.07, -1700.17, 12.53, 0.00, 0.00, 0.00);
GetDynamicObjectPos(objj,RadarInfo[3][R_X], RadarInfo[3][R_Y], RadarInfo[3][R_Z]);
RadarInfo[3][R_Velo] = 85;
objj = CreateDynamicObject(18880, 1349.91, -1420.35, 12.53, 0.00, 0.00, 0.00);
GetDynamicObjectPos(objj,RadarInfo[4][R_X], RadarInfo[4][R_Y], RadarInfo[4][R_Z]);
RadarInfo[4][R_Velo] = 125;
objj = CreateDynamicObject(18880, 1335.20, -1160.33, 22.86, 0.00, 0.00, 0.00);
GetDynamicObjectPos(objj,RadarInfo[5][R_X], RadarInfo[5][R_Y], RadarInfo[5][R_Z]);
RadarInfo[5][R_Velo] = 110;
objj = CreateDynamicObject(18880, 1430.89, -1040.98, 22.81, 0.00, 0.00, 90.08);
GetDynamicObjectPos(objj,RadarInfo[6][R_X], RadarInfo[6][R_Y], RadarInfo[6][R_Z]);
RadarInfo[6][R_Velo] = 85;
objj = CreateDynamicObject(18880, 1144.74, -1046.58, 30.90, 0.00, 0.00, 87.89);
GetDynamicObjectPos(objj,RadarInfo[7][R_X], RadarInfo[7][R_Y], RadarInfo[7][R_Z]);
RadarInfo[7][R_Velo] = 120;
objj = CreateDynamicObject(18880, 1037.81, -946.43, 41.74, 0.00, 0.00, 279.84);
GetDynamicObjectPos(objj,RadarInfo[8][R_X], RadarInfo[8][R_Y], RadarInfo[8][R_Z]);
RadarInfo[8][R_Velo] = 135;
objj = CreateDynamicObject(18880, 1244.50, -946.66, 41.50, 0.00, 0.00, 104.49);
GetDynamicObjectPos(objj,RadarInfo[9][R_X], RadarInfo[9][R_Y], RadarInfo[9][R_Z]);
RadarInfo[9][R_Velo] = 135;
objj = CreateDynamicObject(18880, 1857.87, -1358.73, 12.54, 0.00, 0.00, 0.00);
GetDynamicObjectPos(objj,RadarInfo[10][R_X], RadarInfo[10][R_Y], RadarInfo[10][R_Z]);
RadarInfo[10][R_Velo] = 115;
objj = CreateDynamicObject(18880, 1814.76, -1629.02, 12.54, 0.00, 0.00, 0.00);
GetDynamicObjectPos(objj,RadarInfo[11][R_X], RadarInfo[11][R_Y], RadarInfo[11][R_Z]);
RadarInfo[11][R_Velo] = 110;
objj = CreateDynamicObject(18880, 1740.10, -1725.78, 12.53, 0.00, 0.00, 273.33);
GetDynamicObjectPos(objj,RadarInfo[12][R_X], RadarInfo[12][R_Y], RadarInfo[12][R_Z]);
RadarInfo[12][R_Velo] = 105;
objj = CreateDynamicObject(18880, 1548.65, -1725.15, 12.53, 0.00, 0.00, 273.16);
GetDynamicObjectPos(objj,RadarInfo[13][R_X], RadarInfo[13][R_Y], RadarInfo[13][R_Z]);
RadarInfo[13][R_Velo] = 95;
objj = CreateDynamicObject(18880, 1407.31, -1725.01, 12.53, 0.00, 0.00, 268.40);
GetDynamicObjectPos(objj,RadarInfo[14][R_X], RadarInfo[14][R_Y], RadarInfo[14][R_Z]);
RadarInfo[14][R_Velo] = 95;
objj = CreateDynamicObject(18880,0,0,0,0.00, 0.00,0, 0);// desativado
GetDynamicObjectPos(objj,RadarInfo[15][R_X], RadarInfo[15][R_Y], RadarInfo[15][R_Z]);
RadarInfo[15][R_Velo] = 999;
objj = CreateDynamicObject(18880, 1515.70, -1878.96, 12.54, 0.00, 0.00, 92.06);
GetDynamicObjectPos(objj,RadarInfo[16][R_X], RadarInfo[16][R_Y], RadarInfo[16][R_Z]);
RadarInfo[16][R_Velo] = 110;
objj = CreateDynamicObject(18880, 1949.62, -1939.68, 12.53, 0.00, 0.00, 88.77);
GetDynamicObjectPos(objj,RadarInfo[17][R_X], RadarInfo[17][R_Y], RadarInfo[17][R_Z]);
RadarInfo[17][R_Velo] = 105;
objj = CreateDynamicObject(18880, 2402.13, -1739.48, 12.53, 0.00, 0.00, 90.45);
GetDynamicObjectPos(objj,RadarInfo[18][R_X], RadarInfo[18][R_Y], RadarInfo[18][R_Z]);
RadarInfo[18][R_Velo] = 125;
objj = CreateDynamicObject(18880, 2329.64, -1667.00, 12.78, 0.00, 0.00, 92.67);
GetDynamicObjectPos(objj,RadarInfo[19][R_X], RadarInfo[19][R_Y], RadarInfo[19][R_Z]);
RadarInfo[19][R_Velo] = 110;
objj = CreateDynamicObject(18880, 2336.11, -1550.72, 22.99, 0.00, 0.00, 0.00);
GetDynamicObjectPos(objj,RadarInfo[20][R_X], RadarInfo[20][R_Y], RadarInfo[20][R_Z]);
RadarInfo[20][R_Velo] = 125;
objj = CreateDynamicObject(18880, 2256.51, -1293.55, 22.96, 0.00, 0.00, 266.25);
GetDynamicObjectPos(objj,RadarInfo[21][R_X], RadarInfo[21][R_Y], RadarInfo[21][R_Z]);
RadarInfo[21][R_Velo] = 105;
objj = CreateDynamicObject(18880, 2174.51, -1286.26, 22.97, 0.00, 0.00, 0.00);
GetDynamicObjectPos(objj,RadarInfo[22][R_X], RadarInfo[22][R_Y], RadarInfo[22][R_Z]);
RadarInfo[22][R_Velo] = 105;
objj = CreateDynamicObject(18880, 2079.20, -1251.32, 22.96, 0.00, 0.00, 0.00);
GetDynamicObjectPos(objj,RadarInfo[23][R_X], RadarInfo[23][R_Y], RadarInfo[23][R_Z]);
RadarInfo[23][R_Velo] = 110;
objj = CreateDynamicObject(18880, 2105.10, -1589.64, 24.90, 0.00, 0.00, 0.00);
GetDynamicObjectPos(objj,RadarInfo[24][R_X], RadarInfo[24][R_Y], RadarInfo[24][R_Z]);
RadarInfo[24][R_Velo] = 130;
objj = CreateDynamicObject(18880, 2075.95, -1759.60, 12.54, 0.00, 0.00, 88.92);
GetDynamicObjectPos(objj,RadarInfo[25][R_X], RadarInfo[25][R_Y], RadarInfo[25][R_Z]);
RadarInfo[25][R_Velo] = 110;
objj = CreateDynamicObject(18880, 2184.19, -1631.81, 14.37, 0.00, 0.00, 252.22);
GetDynamicObjectPos(objj,RadarInfo[26][R_X], RadarInfo[26][R_Y], RadarInfo[26][R_Z]);
RadarInfo[26][R_Velo] = 125;
objj = CreateDynamicObject(18880, 1867.53, -1453.72, 12.55, 0.00, 0.00, 271.18);
GetDynamicObjectPos(objj,RadarInfo[27][R_X], RadarInfo[27][R_Y], RadarInfo[27][R_Z]);
RadarInfo[27][R_Velo] = 95;
objj = CreateDynamicObject(18880, 1620.69, -1433.70, 12.54, 0.00, 0.00, 270.41);
GetDynamicObjectPos(objj,RadarInfo[28][R_X], RadarInfo[28][R_Y], RadarInfo[28][R_Z]);
RadarInfo[28][R_Velo] = 110;
objj = CreateDynamicObject(18880, 1592.55, -1310.41, 16.45, 0.00, 0.00, 89.19);
GetDynamicObjectPos(objj,RadarInfo[ 29 ][R_X], RadarInfo[ 29 ][R_Y], RadarInfo[ 29 ][R_Z]);
RadarInfo[ 29 ][R_Velo] = 105;
objj = CreateDynamicObject(18880, 1722.38, -1314.88, 12.54, 0.00, 0.00, 0.00);
GetDynamicObjectPos(objj,RadarInfo[30][R_X], RadarInfo[30][R_Y], RadarInfo[30][R_Z]);
RadarInfo[30][R_Velo] = 105;
objj = CreateDynamicObject(18880, 1650.27, -1153.66, 23.02, 0.00, 0.00, 88.55);
GetDynamicObjectPos(objj,RadarInfo[31][R_X], RadarInfo[31][R_Y], RadarInfo[31][R_Z]);
RadarInfo[31][R_Velo] = 125;
objj = CreateDynamicObject(18880, 2163.80, -1125.23, 24.58, 0.00, 0.00, 82.21);
GetDynamicObjectPos(objj,RadarInfo[32][R_X], RadarInfo[32][R_Y], RadarInfo[32][R_Z]);
RadarInfo[32][R_Velo] = 110;
objj = CreateDynamicObject(18880, 2316.89, -1161.72, 25.96, 0.00, 0.00, 84.76);
GetDynamicObjectPos(objj,RadarInfo[33][R_X], RadarInfo[33][R_Y], RadarInfo[33][R_Z]);
RadarInfo[33][R_Velo] = 95;
objj = CreateDynamicObject(18880, 2831.94, -1158.46, 23.95, 0.00, 0.00, 0.00);
GetDynamicObjectPos(objj,RadarInfo[34][R_X], RadarInfo[34][R_Y], RadarInfo[34][R_Z]);
RadarInfo[34][R_Velo] = 130;
objj = CreateDynamicObject(18880, 2864.07, -1499.86, 9.93, 0.00, 0.00, 351.20);
GetDynamicObjectPos(objj,RadarInfo[35][R_X], RadarInfo[35][R_Y], RadarInfo[35][R_Z]);
RadarInfo[35][R_Velo] = 140;
objj = CreateDynamicObject(18880, 1682.07, -1716.73, 12.54, 0.00, 0.00, 359.68);
GetDynamicObjectPos(objj,RadarInfo[36][R_X], RadarInfo[36][R_Y], RadarInfo[36][R_Z]);
RadarInfo[36][R_Velo] = 105;
objj = CreateDynamicObject(18880, 1623.75, -1585.85, 12.52, 0.00, 0.00, 267.93);
GetDynamicObjectPos(objj,RadarInfo[37][R_X], RadarInfo[37][R_Y], RadarInfo[37][R_Z]);
RadarInfo[37][R_Velo] = 105;
objj = CreateDynamicObject(18880, 1408.82, -1599.32, 12.53, 0.00, 0.00, 87.51);
GetDynamicObjectPos(objj,RadarInfo[38][R_X], RadarInfo[38][R_Y], RadarInfo[38][R_Z]);
RadarInfo[38][R_Velo] = 95;
objj = CreateDynamicObject(18880, 1133.90, -1579.65, 12.48, 0.00, 0.00, 94.71);
GetDynamicObjectPos(objj,RadarInfo[39][R_X], RadarInfo[39][R_Y], RadarInfo[39][R_Z]);
RadarInfo[39][R_Velo] = 110;
objj = CreateDynamicObject(18880, 924.68, -1505.54, 12.52, 0.00, 0.00, 0.00);
GetDynamicObjectPos(objj,RadarInfo[40][R_X], RadarInfo[40][R_Y], RadarInfo[40][R_Z]);
RadarInfo[40][R_Velo] = 125;
objj = CreateDynamicObject(18880, 810.61, -1312.82, 12.54, 0.00, 0.00, 265.53);
GetDynamicObjectPos(objj,RadarInfo[41][R_X], RadarInfo[41][R_Y], RadarInfo[41][R_Z]);
RadarInfo[41][R_Velo] = 110;
objj = CreateDynamicObject(18880, 789.72, -1378.93, 12.63, 0.00, 0.00, 0.00);
GetDynamicObjectPos(objj,RadarInfo[42][R_X], RadarInfo[42][R_Y], RadarInfo[42][R_Z]);
RadarInfo[42][R_Velo] = 140;
objj = CreateDynamicObject(18880, 649.03, -1326.90, 12.49, 0.00, 0.00, 92.10);
GetDynamicObjectPos(objj,RadarInfo[43][R_X], RadarInfo[43][R_Y], RadarInfo[43][R_Z]);
RadarInfo[43][R_Velo] = 105;
objj = CreateDynamicObject(18880, 614.64, -1413.42, 12.55, 0.00, 0.00, 98.93);
GetDynamicObjectPos(objj,RadarInfo[44][R_X], RadarInfo[44][R_Y], RadarInfo[44][R_Z]);
RadarInfo[44][R_Velo] = 155;
objj = CreateDynamicObject(18880, 736.96, -1594.26, 13.38, 0.00, 0.00, 94.17);
GetDynamicObjectPos(objj,RadarInfo[45][R_X], RadarInfo[45][R_Y], RadarInfo[45][R_Z]);
RadarInfo[45][R_Velo] = 110;
for(new i = 0; i < 45; i++)
{
RadarInfo[i][TextRadar] = Create3DTextLabel("(( RADAR ))",0xFFFF00F6,RadarInfo[i][R_X], RadarInfo[i][R_Y], RadarInfo[i][R_Z]+5.0,120.0,0);
}
}
BPS::UpdateRadar()
{
new gstring[256];
foreach(Player, i)
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER && !OnDuty[i] && GetVehicleModel(GetPlayerVehicleID(i)) != 510)
{
for(new ii = 0; ii < 45; ii++)
{
if(IsPlayerInRangeOfPoint(i, 40.0, RadarInfo[ii][R_X],RadarInfo[ii][R_Y],RadarInfo[ii][R_Z]))
{
if(GetPlayerVehicleSpeed(i) > RadarInfo[ii][R_Velo])
{
PlayerPlaySound(i, 1132, 0.0, 0.0, 0.0);
format(gstring, 127, "((RADAR)): {B4B5B7}Você foi pego a {FFFFFF}%dkm/h {B4B5B7}na região onde a velocidade máxima é de {FFFFFF}%dkm/h", GetPlayerVehicleSpeed(i), RadarInfo[ii][R_Velo]);
SendClientMessage(i, -1, gstring);
PlayerInfo[i][pMultas] += 95;
}
}
}
}
}
for(new uu = 0; uu < 45; uu++)
{
if(mostrarv)
{
format(gstring, sizeof gstring, "(( RADAR ))\nMáxima velocidade: %d km/h", RadarInfo[uu][R_Velo]);
Update3DTextLabelText(RadarInfo[uu][TextRadar],0xFFFF00F6, gstring);
mostrarv = false;
}
else
{
Update3DTextLabelText(RadarInfo[uu][TextRadar],0xFFFF00F6, "(( RADAR ))");
mostrarv = true;
}
}
//MudarNomeServer();
return 0;
}
PHP Code:
Maxima velocidade: %d km/h