08.04.2015, 11:30
(
Последний раз редактировалось JaKe Elite; 12.04.2015 в 04:19.
)
UPDATES: The toy system is fixed by ignoring the slot 0 in the entire code, but not on looping (to prevent passing the problem on slot 1 and so on), I STILL NEED YOUR HELP ON VEHICLE SYSTEM.
The loop for the Toy System and Vehicle System is bugging out the stuffs of players.
#1 - The toy system slot 0, ptModelID is always 0 while the other slots toy for ptModelID is not null.
Note: 100% sure that i have a model on that slot, it saves fine. It got resets on relog (Loop)
#2 - The vehicle system slot 2 upto MAX_PLAYERVEHICLES pvPosX is always 0, while the first slot has no problems on posX.
Note: Again, this is tested. The vehicles always spawn in Flint County (Y and Z is not null only X).
Another Note:
"Remove this loop, Done, you are stupid JaKe" - No, removing the loop will cause troubles, conflicting vehicles/toys to other players, cloning. And also commenting or removing the ptModelID, pvPosX will not work. It will only work on your first connect, and on the another relog if you do not have the ID you had when you first connected. It will bug out again due to conflicting/cloning.
Code:
The loop for the Toy System and Vehicle System is bugging out the stuffs of players.
#1 - The toy system slot 0, ptModelID is always 0 while the other slots toy for ptModelID is not null.
Note: 100% sure that i have a model on that slot, it saves fine. It got resets on relog (Loop)
#2 - The vehicle system slot 2 upto MAX_PLAYERVEHICLES pvPosX is always 0, while the first slot has no problems on posX.
Note: Again, this is tested. The vehicles always spawn in Flint County (Y and Z is not null only X).
Another Note:
"Remove this loop, Done, you are stupid JaKe" - No, removing the loop will cause troubles, conflicting vehicles/toys to other players, cloning. And also commenting or removing the ptModelID, pvPosX will not work. It will only work on your first connect, and on the another relog if you do not have the ID you had when you first connected. It will bug out again due to conflicting/cloning.
Code:
PHP код:
for(new v; v < 7; v++)
{
PlayerVehicleInfo[playerid][v][pvModelId] = 0;
PlayerVehicleInfo[playerid][v][pvPosX] = 0.0;
PlayerVehicleInfo[playerid][v][pvPosY] = 0.0;
PlayerVehicleInfo[playerid][v][pvPosZ] = 0.0;
PlayerVehicleInfo[playerid][v][pvPosAngle] = 0.0;
PlayerVehicleInfo[playerid][v][pvLock] = 0;
PlayerVehicleInfo[playerid][v][pvLocked] = 0;
PlayerVehicleInfo[playerid][v][pvBLocked] = 0;
PlayerVehicleInfo[playerid][v][pvBLock] = 0;
PlayerVehicleInfo[playerid][v][pvPaintJob] = -1;
PlayerVehicleInfo[playerid][v][pvColor1] = 0;
PlayerVehicleInfo[playerid][v][pvImpounded] = 0;
PlayerVehicleInfo[playerid][v][pvColor2] = 0;
PlayerVehicleInfo[playerid][v][pvPrice] = 0;
PlayerVehicleInfo[playerid][v][pvTicket] = 0;
PlayerVehicleInfo[playerid][v][pvWeapons][0] = 0;
PlayerVehicleInfo[playerid][v][pvWeapons][1] = 0;
PlayerVehicleInfo[playerid][v][pvWeapons][2] = 0;
PlayerVehicleInfo[playerid][v][pvWepAmmo][0] = 0;
PlayerVehicleInfo[playerid][v][pvWepAmmo][1] = 0;
PlayerVehicleInfo[playerid][v][pvWepAmmo][2] = 0;
PlayerVehicleInfo[playerid][v][pvWepUpgrade] = 0;
// RL - 03/30/15
PlayerVehicleInfo[playerid][v][pvPot] = 0;
PlayerVehicleInfo[playerid][v][pvCrack] = 0;
PlayerVehicleInfo[playerid][v][pvMats] = 0;
PlayerVehicleInfo[playerid][v][pvHeroin] = 0;
PlayerVehicleInfo[playerid][v][pvMeth] = 0;
PlayerVehicleInfo[playerid][v][pvAcid] = 0;
PlayerVehicleInfo[playerid][v][pvPlate] = 0;
//
PlayerVehicleInfo[playerid][v][pvFuel] = 100.0;
//format(PlayerVehicleInfo[playerid][v][pvNumberPlate], 32, "TDSY%d", v); // Ignore this
strcpy(PlayerVehicleInfo[playerid][v][pvAllowPlayer], "No-ne", MAX_PLAYER_NAME);
PlayerVehicleInfo[playerid][v][pvAllowedPlayerId] = INVALID_PLAYER_ID;
PlayerVehicleInfo[playerid][v][pvPark] = 0;
ListItemReleaseId[playerid][v] = -1;
ListItemTrackId[playerid][v] = -1;
for(new m = 0; m < MAX_MODS; m++)
{
PlayerVehicleInfo[playerid][v][pvMods][m] = 0;
}
}
for(new x; x < 10; x++)
{
PlayerToyInfo[playerid][x][ptModelID] = 0;
PlayerToyInfo[playerid][x][ptBone] = 0;
PlayerToyInfo[playerid][x][ptPosX] = 0.0;
PlayerToyInfo[playerid][x][ptPosY] = 0.0;
PlayerToyInfo[playerid][x][ptPosZ] = 0.0;
PlayerToyInfo[playerid][x][ptRotX] = 0.0;
PlayerToyInfo[playerid][x][ptRotY] = 0.0;
PlayerToyInfo[playerid][x][ptRotZ] = 0.0;
PlayerToyInfo[playerid][x][ptScaleX] = 1.0;
PlayerToyInfo[playerid][x][ptScaleY] = 1.0;
PlayerToyInfo[playerid][x][ptScaleZ] = 1.0;
}