24.05.2017, 09:05
Also receiving these
TestEffect:
Код:
[16:14:01] [debug] Run time error 4: "Array index out of bounds" [16:14:01] [debug] Accessing element at negative index -400 [16:14:01] [debug] AMX backtrace: [16:14:01] [debug] #0 0002bf38 in ?? (0) from gm.amx [16:14:01] [debug] #1 0018801c in public TestEffect () from gm.amx
PHP код:
public TestEffect(playerid)
{
switch(random(3))
{
case 0:
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) SetPlayerVelocity(playerid, 0.03, 0.0, 0.05);
}
case 1:
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) SetPlayerVelocity(playerid, 0.05, 0.0, 0.02);
}
case 2:
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) SetPlayerVelocity(playerid, 0.01, 0.05, 0.03);
}
}
for(new vid; vid < GetVehiclePoolSize()+1; vid++)
{
if( GetVehicleMass( vid ) >= 2400.0 ){
SetVehicleAngularVelocity( vid, qmag * 0.03, qmag * 0.03, qmag * 0.03 );
} else SetVehicleAngularVelocity( vid, qmag * 0.05, qmag * 0.05, qmag * 0.05 );
}
new qint = floatround(qmag , floatround_round);
SetPlayerDrunkLevel(playerid, qint* 10000);
return 1;
}