06.12.2009, 19:59
[pawn]
stock AmountOfVehicles()
{
new VCount;
for(new i = 1; i < 2000; i++) if(GetVehicleModel(i) != 0) VCount++;
return VCount;
}
public OnGameModeInit()
{
AddStaticVehicle(411,1,2,3,4,1,2);
for(new i; i < 200; i++)
{
AddStaticVehicle(455,random(500),random(300)+100,r andom(800)/2+350,350%10*random(5),55,55);
AddStaticVehicle(610,random(500),random(300)+100,r andom(800)/2+350,350%10*random(5),55,55);
}
for(new x; x < 300; x++)
{
AddStaticVehicle(412,random(500),random(300)+100,r andom(800)/2+350,350%10*random(5),55,55);
AddStaticVehicle(555,random(500),random(300)+100,r andom(800)/2+350,350%10*random(5),55,55);
AddStaticVehicle(488,random(500),random(300)+100,r andom(800)/2+350,350%10*random(5),55,55);
}
return true;
}
main()
{
printf("
Result: Vehicles 699 | 2000
stock AmountOfVehicles()
{
new VCount;
for(new i = 1; i < 2000; i++) if(GetVehicleModel(i) != 0) VCount++;
return VCount;
}
public OnGameModeInit()
{
AddStaticVehicle(411,1,2,3,4,1,2);
for(new i; i < 200; i++)
{
AddStaticVehicle(455,random(500),random(300)+100,r andom(800)/2+350,350%10*random(5),55,55);
AddStaticVehicle(610,random(500),random(300)+100,r andom(800)/2+350,350%10*random(5),55,55);
}
for(new x; x < 300; x++)
{
AddStaticVehicle(412,random(500),random(300)+100,r andom(800)/2+350,350%10*random(5),55,55);
AddStaticVehicle(555,random(500),random(300)+100,r andom(800)/2+350,350%10*random(5),55,55);
AddStaticVehicle(488,random(500),random(300)+100,r andom(800)/2+350,350%10*random(5),55,55);
}
return true;
}
main()
{
printf("
pawn Код:
: Vehicles %d | %d",AmountOfVehicles(),MAX_VEHICLES);
}