Quote:
Originally Posted by BenzoAMG
pawn Код:
stock LoadPlates() { for(new i = 0; i < MAX_VEHICLES; i++) { if(IsCopVehicle(i)) return SetVehicleNumberPlate(i, "LSPD"); else if(IsMedicVehicle(i)) return SetVehicleNumberPlate(i, "LSEMS"); else if(IsGuardVehicle(i)) return SetVehicleNumberPlate(i, "DoC"); } print("Plates sucessfully loaded."); return 1; }
Give this a shot.
|
It wont work because at the first loop, it will stop, you used return.
pawn Код:
stock LoadPlates()
{
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(IsCopVehicle(i)) SetVehicleNumberPlate(i, "LSPD");
else if(IsMedicVehicle(i)) SetVehicleNumberPlate(i, "LSEMS");
else if(IsGuardVehicle(i)) SetVehicleNumberPlate(i, "DoC");
}
print("Plates sucessfully loaded.");
return 1;
}