Код:
public AutoPark()
{
for(new x; x<=MAX_PLAYERS;x++)
{
if(IsPlayerConnected(x))
{
for(new v=0;v<MAX_PLAYERVEHICLES; v++)
{
new Float:vx, Float:y, Float:z, Float:angle, Float:health;
GetVehicleDamageStatus(PlayerVehicleInfo[x][v][pvId], PlayerVehicleInfo[x][v][pvStatus][0], PlayerVehicleInfo[x][v][pvStatus][1], PlayerVehicleInfo[x][v][pvStatus][2], PlayerVehicleInfo[x][v][pvStatus][3]);
GetVehicleHealth(PlayerVehicleInfo[x][v][pvId], health);
if(PlayerInfo[x][pLockCar] == GetPlayerVehicleID(x)) PlayerInfo[x][pLockCar] = INVALID_VEHICLE_ID;
GetVehiclePos(PlayerVehicleInfo[x][v][pvId], vx, y, z);
GetVehicleZAngle(PlayerVehicleInfo[x][v][pvId], angle);
PlayerVehicleInfo[x][v][pvPosX] = vx;
PlayerVehicleInfo[x][v][pvPosY] = y;
PlayerVehicleInfo[x][v][pvPosZ] = z;
PlayerVehicleInfo[x][v][pvPosAngle] = angle;
PlayerVehicleInfo[x][v][pvHealth] = health;
}
new Float:vx,Float:y,Float:z,Float:a, Float:health;
GetVehicleDamageStatus(PlayerRentInfo[x][prId], PlayerRentInfo[x][prStatus][0], PlayerRentInfo[x][prStatus][1], PlayerRentInfo[x][prStatus][2], PlayerRentInfo[x][prStatus][3]);
GetVehicleHealth(PlayerRentInfo[x][prId], health);
GetVehiclePos(PlayerRentInfo[x][prId], vx, y, z);
GetVehicleZAngle(PlayerRentInfo[x][prId], a);
PlayerRentInfo[x][prPosX] = vx;
PlayerRentInfo[x][prPosY] = y;
PlayerRentInfo[x][prPosZ] = z;
PlayerRentInfo[x][prPosAngle] = a;
PlayerRentInfo[x][prHealth] = health;
for(new i = 0; i <= MAX_WSCAR; i++)
{
new bos = PlayerInfo[x][pWSBos];
GetVehiclePos(WsInfo[bos][wsVehicleId][i], vx, y, z);
GetVehicleZAngle(WsInfo[bos][wsVehicleId][i], a);
WsInfo[bos][wsVehicleX][i] = vx;
WsInfo[bos][wsVehicleY][i] = y;
WsInfo[bos][wsVehicleZ][i] = z;
WsInfo[bos][wsVehicleAngle][i] = a;
}
}
}
}