18.11.2014, 07:55
Код:
[10:19:33] [debug] AMX backtrace: [10:19:33] [debug] #0 00105138 in public Veh_Speedo () at E:\GM.pwn:19834 [10:19:34] [debug] Run time error 4: "Array index out of bounds" [10:19:34] [debug] Accessing element at negative index -400
pawn Код:
function Veh_Speedo( )
{
new sp_string[ 256 ], liSpeed;
foreach( Player, i )
{
new vehicleid = GetPlayerVehicleID( i );
if( vehicleid != 0 && SpeedoStats[ i ] == true )
{
liSpeed = GetPlayerSpeed( i, true );
format( sp_string, sizeof(sp_string), "~w~~h~' ~r~~h~Vehicle: ~w~~h~%s", vehName[ GetVehicleModel( vehicleid ) - 400 ] );
PlayerTextDrawSetString( i, Speedo_TD[ 0 ], sp_string );
format( sp_string, sizeof(sp_string), "~b~~h~KM/h: ~w~~h~%d", liSpeed );
PlayerTextDrawSetString( i, Speedo_TD[ 1 ], sp_string );
}
}
return true;
}