19.07.2010, 15:19
You mean you are using your randc variable? I am guessing that all of the colours are pink, right? :P
Try...
You had randc set to random( 0 ) + 126
This boils down to getting a random number that ranges from 0 to the number specified in the random function - in this case 0, and adding 126 to it. so the result would always be 126.
Try...
pawn Код:
public OnGameModeInit()
{
SetGameModeText("Movie Server 0.0.1");
for(new i=0;i<300;i++)
{
if((i == 0)||(i == 1)||(i == 7)||(i >= 9 && i <= 41)||(i >= 43 && i <= 64)||(i >= 66 && i <= 73)||(i >= 75 && i <= 85)||(i >= 87 && i <= 118)||(i >= 120 && i <= 148)||(i >= 150 && i <= 207)||(i >= 209 && i <= 264)||(i >= 274 && i <= 288)||(i >= 290 && i <= 299))
{
AddPlayerClass(i, -2526.3096, -624.9385, 148.1363, 360.0, 0, 0, 0, 0, 0, 0);
}
}
new allowedVehicles[ ] = {
400, 401, 402 //Add the vehicle models that you want to allow to spawn here.
} ;
AddStaticVehicle( allowedVehicles[ random( sizeof allowedVehicles ) ], -2535.6863, -602.9896, 132.3940, 179.8930, random( 126 ), random( 126 ) );
//Continue like this for as many vehicles as you want
return 1;
}
This boils down to getting a random number that ranges from 0 to the number specified in the random function - in this case 0, and adding 126 to it. so the result would always be 126.