[Ajuda] Velocimetro
#1

Alguem ajuda ai? @edit Resolvi jб!

Код HTML:
[23:23:54] [debug] Run time error 4: "Array index out of bounds"
[23:23:54] [debug]  Attempted to read/write array element at negative index -400
[23:23:54] [debug] AMX backtrace:
[23:23:54] [debug] #0 00161318 in public Velocimetro () from RN.amx
PHP код:
public Velocimetro()
{
foreach(
Playeri)
{
new 
aname[MAX_PLAYER_NAME];
GetPlayerName(ianameMAX_PLAYER_NAME);
if(
IsPlayerInAnyVehicle(i)) {
new 
Float:XFloat:YFloat:ZFloat:Speed;
GetVehicleVelocity(GetPlayerVehicleID(i), XYZ);
Speed floatmul(floatsqroot(floatadd(floatadd(floatpower(X2), floatpower(Y2)),  floatpower(Z2))), 170.0);
new 
Float:vcarro;
GetVehicleHealth(GetPlayerVehicleID(i), vcarro);
new 
velocid;
velocid floatround(Speedfloatround_floor);
new 
string[128];
new 
PlayerVehicleModelID GetVehicleModel(GetPlayerVehicleID(i));
PlayerVehicleModelID -= 400;
new 
ncarro[30];
if(
velocid == 160){
SetTimerEx("remova"1000false"i"i);
}
if(
velocid == 170){
SetTimerEx("remova"1000false"i"i);
}
if(
velocid == 180){
SetTimerEx("remova"1000false"i"i);
}
if(
velocid 195){
SetTimerEx("banspeed"100false"i"i);
}
format(ncarro,30,PlayerVehicle[PlayerVehicleModelID]);
GetPlayer2DZone(izoneMAX_ZONE_NAME);
format(string128,"%i",velocid);
Radar(i);
}
}
return 
1;

Reply


Messages In This Thread
Velocimetro - by merloch - 25.04.2017, 23:44
Re: Velocimetro - by Adiiti - 25.04.2017, 23:50
Re: Velocimetro - by merloch - 26.04.2017, 00:08
Re: Velocimetro - by Adiiti - 26.04.2017, 00:15
Re: Velocimetro - by merloch - 26.04.2017, 00:23

Forum Jump:


Users browsing this thread: 3 Guest(s)