04.08.2018, 21:20
It only gets called when the playerid is = 0, soooooooo I have no idea...
DEBUG:
OnPlayerUpdate
EDIT: If it means anything I don't have crashdetect in an #include just in server.cfg
DEBUG:
PHP код:
[23:13:01] [debug] AMX backtrace:
[23:13:01] [debug] #0 000b6464 in ?? (0, 1, 0, 0, 4, 0, 0, 0, 0, 0, ... <1073741813 arguments>) from UGRPG.amx
[23:13:01] [debug] #1 0001905c in public OnPlayerUpdate (0) from UGRPG.amx
[23:13:01] [debug] Run time error 4: "Array index out of bounds"
pawn Код:
if(AfkCount[playerid] > 0)
{
afktime[playerid] = 0;
AfkCount[playerid] = 0;
// DEFINITON: new AfkCount[MAX_PLAYERS];
// DEFINTION: new afktime[MAX_PLAYERS];
}
if(noclipdata[playerid][cameramode] == CAMERA_MODE_FLY)
{
new keys,ud,lr;
GetPlayerKeys(playerid,keys,ud,lr);
if(noclipdata[playerid][mode] && (GetTickCount() - noclipdata[playerid][lastmove] > 100))
{
MoveCamera(playerid);
}
if(noclipdata[playerid][udold] != ud || noclipdata[playerid][lrold] != lr)
{
if((noclipdata[playerid][udold] != 0 || noclipdata[playerid][lrold] != 0) && ud == 0 && lr == 0)
{
StopPlayerObject(playerid, noclipdata[playerid][flyobject]);
noclipdata[playerid][mode] = 0;
noclipdata[playerid][accelmul] = 0.0;
}
else
{
noclipdata[playerid][mode] = GetMoveDirectionFromKeys(ud, lr);
MoveCamera(playerid);
}
}
noclipdata[playerid][udold] = ud; noclipdata[playerid][lrold] = lr;
return false;
}