SA-MP Forums Archive
Numbers of vehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Numbers of vehicle (/showthread.php?tid=112324)



Numbers of vehicle - MJ! - 06.12.2009

[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("
pawn Код:
: Vehicles %d | %d",AmountOfVehicles(),MAX_VEHICLES);
}
Result: Vehicles 699 | 2000


Re: Numbers of vehicle - dice7 - 06.12.2009

and ?


Re: Numbers of vehicle - MJ! - 06.12.2009

It's bug , lol

(200 * 2) + (300 * 3) + 1 = 1301 Vehicles i must have , and he show 699


Re: Numbers of vehicle - MJ! - 06.12.2009

So , everybody it's wondering ?


Re: Numbers of vehicle - dice7 - 06.12.2009

It shows 1301 on my server


Re: Numbers of vehicle - MJ! - 06.12.2009

So why on mine shows 699 ? It's compiled with 0.3 pawn , also you can see the MAX_VEHICLES appear corectly ...


Re: Numbers of vehicle - Finn - 07.12.2009

Do you have 0.3 a_samp.inc? So the MAX_VEHICLES is not re-defined by you?


Re: Numbers of vehicle - CracK - 07.12.2009

Try moving print message to OnGameModeInit


Re: Numbers of vehicle - MJ! - 07.12.2009

Quote:
Originally Posted by Finn
Do you have 0.3 a_samp.inc? So the MAX_VEHICLES is not re-defined by you?
if you look attently , MAX_PLAYERS shows correct ( 2000 )


Re: Numbers of vehicle - MenaceX^ - 07.12.2009

Quote:
Originally Posted by Щә яә Ґя
Quote:
Originally Posted by Finn
Do you have 0.3 a_samp.inc? So the MAX_VEHICLES is not re-defined by you?
if you look attently , MAX_PLAYERS shows correct ( 2000 )
MAX_VEHICLES*