14.05.2014, 20:17
(
Последний раз редактировалось Madd92; 14.05.2014 в 22:24.
)
That doesn't make sense at all. With your design you'd have to check for every vehicle id if it is an LCN vehicle. That doesn't have to do anything with the players. Also the tmpcar is completely useless.
You could do it like this:
But there are better possibilities for example the foreach solution by ******.
You could do it like this:
pawn Код:
if (strcmp(cmd, "/lcncarrespawn", true) == 0 || strcmp(cmd, "/lcr", true) == 0)
{
if (PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pRank] == 6)
{
for (new tmpcar = 1; tmpcar <= MAX_VEHICLES; tmpcar++)
{
if (!IsVehicleOccupied(tmpcar) && IsAlcnCar(tmpcar))
SetVehicleToRespawn(tmpcar);
}
}
return 1;
}