command(trabalhar, playerid, params[])
{
if(PlayerInfo[playerid][pClass] == TEAM_TRUCK)
{
if(GetVehicleTrailer(GetPlayerVehicleID(playerid)))
{
rot[playerid] = 0;
for(new wp = 0; wp < sizeof (Locais); wp++ )
{
if(!IsPlayerInRangeOfPoint(playerid, 100000, Locais[wp][X], Locais[wp][Y], Locais[wp][Z]))return true;
rot[playerid]++;
PlayerInfo[playerid][pInfo][rot[playerid]] = Locais[wp][RotaID];
printf("pInfo %d | Rot %d", PlayerInfo[playerid][pInfo][rot[playerid]], rot[playerid]);
}
Chamar(playerid);
}
else SendClientMessage(playerid, -1,"[ERRO] Vocк nгo tem carroceria.");
}
return true;
}
Usa o plugin crashdetect pra ver, geralmente isso estб ligado a um stack overflow.
https://mega.co.nz/#!dogBhJRY!dv5NXQ...hTS-YIj-iPC9SE |
[18:25:57] [debug] Run time error 4: "Array index out of bounds" [18:25:57] [debug] Accessing element at index 4 past array upper bound 3 [18:25:57] [debug] AMX backtrace: [18:25:57] [debug] #0 0001ce0c in public cmd_trabalhar () from Trucking.amx [18:25:57] [debug] #1 native CallLocalFunction () [00471e90] from samp-server.exe [18:25:57] [debug] #2 0000596c in public OnPlayerCommandText () from Trucking.amx