SA-MP Forums Archive
Making certain ids exempt - 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: Making certain ids exempt (/showthread.php?tid=161304)



Making certain ids exempt - Яσскѕтая - 19.07.2010

I want to make cars randomly spawn but not spawn big trucks, monster trucks, planes, or helis.
I currently have
Код:
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 rand = random(211)+400;
	new rand2 = random(211)+400;
	new rand3 = random(211)+400;
	new rand4 = random(211)+400;
	new rand5 = random(211)+400;
	new rand6 = random(211)+400;
	new rand7 = random(211)+400;
	new rand8 = random(211)+400;
	new rand9 = random(211)+400;
	new rand10 = random(211)+400;
	new rand11 = random(211)+400;
	new rand12 = random(211)+400;
 	new randc = random(0)+126;
    AddStaticVehicle(rand,-2535.6863,-602.9896,132.3940,179.8930,randc,randc);
	AddStaticVehicle(rand2,-2531.7119,-603.1975,132.3941,178.8419,randc,randc);
	AddStaticVehicle(rand3,-2528.1055,-603.0823,132.3942,179.9627,randc,randc);
	AddStaticVehicle(rand4,-2524.3159,-602.8835,132.3943,180.0245,randc,randc);
	AddStaticVehicle(rand5,-2520.6118,-603.2492,132.3941,178.7753,randc,randc);
	AddStaticVehicle(rand6,-2516.8125,-603.2576,132.3942,178.7595,randc,randc);
	AddStaticVehicle(rand7,-2513.0564,-602.7173,132.3943,180.0847,randc,randc);
	AddStaticVehicle(rand8,-2509.4929,-603.1609,132.3943,180.1749,randc,randc);
	AddStaticVehicle(rand9,-2505.6755,-602.9529,132.3940,179.9040,randc,randc);
	AddStaticVehicle(rand10,-2501.9355,-603.3615,132.3943,178.8831,randc,randc);
	AddStaticVehicle(rand11,-2498.1853,-603.1845,132.3942,180.8211,randc,randc);
	AddStaticVehicle(rand12,-2494.4438,-603.3358,132.3942,177.8813,randc,randc);
}
I tried doing
Код:
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 rand = random(211)+400;
	new rand2 = random(211)+400;
	new rand3 = random(211)+400;
	new rand4 = random(211)+400;
	new rand5 = random(211)+400;
	new rand6 = random(211)+400;
	new rand7 = random(211)+400;
	new rand8 = random(211)+400;
	new rand9 = random(211)+400;
	new rand10 = random(211)+400;
	new rand11 = random(211)+400;
	new rand12 = random(211)+400;
 	new randc = random(0)+126;
	if(rand == 403 || rand == 406 || rand == 408 || rand == 417 || rand == 425 || rand == 427 || rand == 428 || rand == 431 || rand == 432 || rand == 433 || rand == 435 || rand == 437 || rand == 443 || rand == 444 || rand == 446 || rand == 447 || rand == 449 || rand == 450 || rand == 452 || rand == 453 || rand == 454 || rand == 455 || rand == 456 || rand == 460 || rand == 469 || rand == 472 || rand == 473 || rand == 476 || rand == 484 || rand == 486 || rand == 487 || rand == 488 || rand == 497 || rand == 501 || rand == 511 || rand == 512 || rand == 513 || rand == 514 || rand == 515 || rand == 519 || rand == 520 || rand == 524 || rand == 530 || rand == 531 || rand == 532 || rand == 537 || rand == 538 || rand == 539 || rand == 544 || rand == 548 || rand == 553 || rand == 556 || rand == 557 || rand == 563 || rand == 564 || rand == 569 || rand == 570 || rand == 571 || rand == 572 || rand == 574 || rand == 577 || rand == 578 || rand == 584 || rand == 590 || rand == 591 || rand == 592 || rand == 593 || rand == 594 || rand == 595 || rand == 601 || rand == 609 || rand == 610 || rand == 611)
	{
	    return 1;
	}
	if(rand2 == 403 || rand2 == 406 || rand2 == 408 || rand2 == 417 || rand2 == 425 || rand2 == 427 || rand2 == 428 || rand2 == 431 || rand2 == 432 || rand2 == 433 || rand2 == 435 || rand2 == 437 || rand2 == 443 || rand2 == 444 || rand2 == 446 || rand2 == 447 || rand2 == 449 || rand2 == 450 || rand2 == 452 || rand2 == 453 || rand2 == 454 || rand2 == 455 || rand2 == 456 || rand2 == 460 || rand2 == 469 || rand2 == 472 || rand2 == 473 || rand2 == 476 || rand2 == 484 || rand2 == 486 || rand2 == 487 || rand2 == 488 || rand2 == 497 || rand2 == 501 || rand2 == 511 || rand2 == 512 || rand2 == 513 || rand2 == 514 || rand2 == 515 || rand2 == 519 || rand2 == 520 || rand2 == 524 || rand2 == 530 || rand2 == 531 || rand2 == 532 || rand2 == 537 || rand2 == 538 || rand2 == 539 || rand2 == 544 || rand2 == 548 || rand2 == 553 || rand2 == 556 || rand2 == 557 || rand2 == 563 || rand2 == 564 || rand2 == 569 || rand2 == 570 || rand2 == 571 || rand2 == 572 || rand2 == 574 || rand2 == 577 || rand2 == 578 || rand2 == 584 || rand2 == 590 || rand2 == 591 || rand2 == 592 || rand2 == 593 || rand2 == 594 || rand2 == 595 || rand2 == 601 || rand2 == 609 || rand2 == 610 || rand2 == 611);
	{
	    return 1;
	}
	if(rand3 == 403 || rand3 == 406 || rand3 == 408 || rand3 == 417 || rand3 == 425 || rand3 == 427 || rand3 == 428 || rand3 == 431 || rand3 == 432 || rand3 == 433 || rand3 == 435 || rand3 == 437 || rand3 == 443 || rand3 == 444 || rand3 == 446 || rand3 == 447 || rand3 == 449 || rand3 == 450 || rand3 == 452 || rand3 == 453 || rand3 == 454 || rand3 == 455 || rand3 == 456 || rand3 == 460 || rand3 == 469 || rand3 == 472 || rand3 == 473 || rand3 == 476 || rand3 == 484 || rand3 == 486 || rand3 == 487 || rand3 == 488 || rand3 == 497 || rand3 == 501 || rand3 == 511 || rand3 == 512 || rand3 == 513 || rand3 == 514 || rand3 == 515 || rand3 == 519 || rand3 == 520 || rand3 == 524 || rand3 == 530 || rand3 == 531 || rand3 == 532 || rand3 == 537 || rand3 == 538 || rand3 == 539 || rand3 == 544 || rand3 == 548 || rand3 == 553 || rand3 == 556 || rand3 == 557 || rand3 == 563 || rand3 == 564 || rand3 == 569 || rand3 == 570 || rand3 == 571 || rand3 == 572 || rand3 == 574 || rand3 == 577 || rand3 == 578 || rand3 == 584 || rand3 == 590
	{
	    return 1;
	}
 	if(rand4 == 403 || rand4 == 406 || rand4 == 408 || rand4 == 417 || rand4 == 425 || rand4 == 427 || rand4 == 428 || rand4 == 431 || rand4 == 432 || rand4 == 433 || rand4 == 435 || rand4 == 437 || rand4 == 443 || rand4 == 444 || rand4 == 446 || rand4 == 447 || rand4 == 449 || rand4 == 450 || rand4 == 452 || rand4 == 453 || rand4 == 454 || rand4 == 455 || rand4 == 456 || rand4 == 460 || rand4 == 469 || rand4 == 472 || rand4 == 473 || rand4 == 476 || rand4 == 484 || rand4 == 486 || rand4 == 487 || rand4 == 488 || rand4 == 497 || rand4 == 501 || rand4 == 511 || rand4 == 512 || rand4 == 513 || rand4 == 514 || rand4 == 515 || rand4 == 519 || rand4 == 520 || rand4 == 524 || rand4 == 530 || rand4 == 531 || rand4 == 532 || rand4 == 537 || rand4 == 538 || rand4 == 539 || rand4 == 544 || rand4 == 548 || rand4 == 553 || rand4 == 556 || rand4 == 557 || rand4 == 563 || rand4 == 564 || rand4 == 569 || rand4 == 570 || rand4 == 571 || rand4 == 572 || rand4 == 574 || rand4 == 577 || rand4 == 578 || rand4 == 584 || rand4 == 590 || rand4 == 591 || rand4 == 592 || rand4 == 593 || rand4 == 594 || rand4 == 595 || rand4 == 601 || rand4 == 609 || rand4 == 610 || rand4 == 611)
	{
	    return 1;
	}
	if(rand5 == 403 || rand5 == 406 || rand5 == 408 || rand5 == 417 || rand5 == 425 || rand5 == 427 || rand5 == 428 || rand5 == 431 || rand5 == 432 || rand5 == 433 || rand5 == 435 || rand5 == 437 || rand5 == 443 || rand5 == 444 || rand5 == 446 || rand5 == 447 || rand5 == 449 || rand5 == 450 || rand5 == 452 || rand5 == 453 || rand5 == 454 || rand5 == 455 || rand5 == 456 || rand5 == 460 || rand5 == 469 || rand5 == 472 || rand5 == 473 || rand5 == 476 || rand5 == 484 || rand5 == 486 || rand5 == 487 || rand5 == 488 || rand5 == 497 || rand5 == 501 || rand5 == 511 || rand5 == 512 || rand5 == 513 || rand5 == 514 || rand5 == 515 || rand5 == 519 || rand5 == 520 || rand5 == 524 || rand5 == 530 || rand5 == 531 || rand5 == 532 || rand5 == 537 || rand5 == 538 || rand5 == 539 || rand5 == 544 || rand5 == 548 || rand5 == 553 || rand5 == 556 || rand5 == 557 || rand5 == 563 || rand5 == 564 || rand5 == 569 || rand5 == 570 || rand5 == 571 || rand5 == 572 || rand5 == 574 || rand5 == 577 || rand5 == 578 || rand5 == 584 || rand5 == 590 || rand5 == 591 || rand5 == 592 || rand5 == 593 || rand5 == 594 || rand5 == 595 || rand5 == 601 || rand5 == 609 || rand5 == 610 || rand5 == 611)
	{
	    return 1;
	}
	if(rand6 == 403 || rand6 == 406 || rand6 == 408 || rand6 == 417 || rand6 == 425 || rand6 == 427 || rand6 == 428 || rand6 == 431 || rand6 == 432 || rand6 == 433 || rand6 == 435 || rand6 == 437 || rand6 == 443 || rand6 == 444 || rand6 == 446 || rand6 == 447 || rand6 == 449 || rand6 == 450 || rand6 == 452 || rand6 == 453 || rand6 == 454 || rand6 == 455 || rand6 == 456 || rand6 == 460 || rand6 == 469 || rand6 == 472 || rand6 == 473 || rand6 == 476 || rand6 == 484 || rand6 == 486 || rand6 == 487 || rand6 == 488 || rand6 == 497 || rand6 == 501 || rand6 == 511 || rand6 == 512 || rand6 == 513 || rand6 == 514 || rand6 == 515 || rand6 == 519 || rand6 == 520 || rand6 == 524 || rand6 == 530 || rand6 == 531 || rand6 == 532 || rand6 == 537 || rand6 == 538 || rand6 == 539 || rand6 == 544 || rand6 == 548 || rand6 == 553 || rand6 == 556 || rand6 == 557 || rand6 == 563 || rand6 == 564 || rand6 == 569 || rand6 == 570 || rand6 == 571 || rand6 == 572 || rand6 == 574 || rand6 == 577 || rand6 == 578 || rand6 == 584 || rand6 == 590 || rand6 == 591 || rand6 == 592 || rand6 == 593 || rand6 == 594 || rand6 == 595 || rand6 == 601 || rand6 == 609 || rand6 == 610 || rand6 == 611)
	{
	    return 1;
	}
	if(rand7 == 403 || rand7 == 406 || rand7 == 408 || rand7 == 417 || rand7 == 425 || rand7 == 427 || rand7 == 428 || rand7 == 431 || rand7 == 432 || rand7 == 433 || rand7 == 435 || rand7 == 437 || rand7 == 443 || rand7 == 444 || rand7 == 446 || rand7 == 447 || rand7 == 449 || rand7 == 450 || rand7 == 452 || rand7 == 453 || rand7 == 454 || rand7 == 455 || rand7 == 456 || rand7 == 460 || rand7 == 469 || rand7 == 472 || rand7 == 473 || rand7 == 476 || rand7 == 484 || rand7 == 486 || rand7 == 487 || rand7 == 488 || rand7 == 497 || rand7 == 501 || rand7 == 511 || rand7 == 512 || rand7 == 513 || rand7 == 514 || rand7 == 515 || rand7 == 519 || rand7 == 520 || rand7 == 524 || rand7 == 530 || rand7 == 531 || rand7 == 532 || rand7 == 537 || rand7 == 538 || rand7 == 539 || rand7 == 544 || rand7 == 548 || rand7 == 553 || rand7 == 556 || rand7 == 557 || rand7 == 563 || rand7 == 564 || rand7 == 569 || rand7 == 570 || rand7 == 571 || rand7 == 572 || rand7 == 574 || rand7 == 577 || rand7 == 578 || rand7 == 584 || rand7 == 590 || rand7 == 591 || rand7 == 592 || rand7 == 593 || rand7 == 594 || rand7 == 595 || rand7 == 601 || rand7 == 609 || rand7 == 610 || rand7 == 611)
	{
	    return 1;
	}
	if(rand8 == 403 || rand8 == 406 || rand8 == 408 || rand8 == 417 || rand8 == 425 || rand8 == 427 || rand8 == 428 || rand8 == 431 || rand8 == 432 || rand8 == 433 || rand8 == 435 || rand8 == 437 || rand8 == 443 || rand8 == 444 || rand8 == 446 || rand8 == 447 || rand8 == 449 || rand8 == 450 || rand8 == 452 || rand8 == 453 || rand8 == 454 || rand8 == 455 || rand8 == 456 || rand8 == 460 || rand8 == 469 || rand8 == 472 || rand8 == 473 || rand8 == 476 || rand8 == 484 || rand8 == 486 || rand8 == 487 || rand8 == 488 || rand8 == 497 || rand8 == 501 || rand8 == 511 || rand8 == 512 || rand8 == 513 || rand8 == 514 || rand8 == 515 || rand8 == 519 || rand8 == 520 || rand8 == 524 || rand8 == 530 || rand8 == 531 || rand8 == 532 || rand8 == 537 || rand8 == 538 || rand8 == 539 || rand8 == 544 || rand8 == 548 || rand8 == 553 || rand8 == 556 || rand8 == 557 || rand8 == 563 || rand8 == 564 || rand8 == 569 || rand8 == 570 || rand8 == 571 || rand8 == 572 || rand8 == 574 || rand8 == 577 || rand8 == 578 || rand8 == 584 || rand8 == 590 || rand8 == 591 || rand8 == 592 || rand8 == 593 || rand8 == 594 || rand8 == 595 || rand8 == 601 || rand8 == 609 || rand8 == 610 || rand8 == 611)
	{
	    return 1;
	}
	if(rand9 == 403 || rand9 == 406 || rand9 == 408 || rand9 == 417 || rand9 == 425 || rand9 == 427 || rand9 == 428 || rand9 == 431 || rand9 == 432 || rand9 == 433 || rand9 == 435 || rand9 == 437 || rand9 == 443 || rand9 == 444 || rand9 == 446 || rand9 == 447 || rand9 == 449 || rand9 == 450 || rand9 == 452 || rand9 == 453 || rand9 == 454 || rand9 == 455 || rand9 == 456 || rand9 == 460 || rand9 == 469 || rand9 == 472 || rand9 == 473 || rand9 == 476 || rand9 == 484 || rand9 == 486 || rand9 == 487 || rand9 == 488 || rand9 == 497 || rand9 == 501 || rand9 == 511 || rand9 == 512 || rand9 == 513 || rand9 == 514 || rand9 == 515 || rand9 == 519 || rand9 == 520 || rand9 == 524 || rand9 == 530 || rand9 == 531 || rand9 == 532 || rand9 == 537 || rand9 == 538 || rand9 == 539 || rand9 == 544 || rand9 == 548 || rand9 == 553 || rand9 == 556 || rand9 == 557 || rand9 == 563 || rand9 == 564 || rand9 == 569 || rand9 == 570 || rand9 == 571 || rand9 == 572 || rand9 == 574 || rand9 == 577 || rand9 == 578 || rand9 == 584 || rand9 == 590 || rand9 == 591 || rand9 == 592 || rand9 == 593 || rand9 == 594 || rand9 == 595 || rand9 == 601 || rand9 == 609 || rand9 == 610 || rand9 == 611)
	{
	    return 1;
	}
	if(rand10 == 403 || rand10 == 406 || rand10 == 408 || rand10 == 417 || rand10 == 425 || rand10 == 427 || rand10 == 428 || rand10 == 431 || rand10 == 432 || rand10 == 433 || rand10 == 435 || rand10 == 437 || rand10 == 443 || rand10 == 444 || rand10 == 446 || rand10 == 447 || rand10 == 449 || rand10 == 450 || rand10 == 452 || rand10 == 453 || rand10 == 454 || rand10 == 455 || rand10 == 456 || rand10 == 460 || rand10 == 469 || rand10 == 472 || rand10 == 473 || rand10 == 476 || rand10 == 484 || rand10 == 486 || rand10 == 487 || rand10 == 488 || rand10 == 497 || rand10 == 501 || rand10 == 511 || rand10 == 512 || rand10 == 513 || rand10 == 514 || rand10 == 515 || rand10 == 519 || rand10 == 520 || rand10 == 524 || rand10 == 530 || rand10 == 531 || rand10 == 532 || rand10 == 537 || rand10 == 538 || rand10 == 539 || rand10 == 544 || rand10 == 548 || rand10 == 553 || rand10 == 556 || rand10 == 557 || rand10 == 563 || rand10 == 564 || rand10 == 569 || rand10 == 570 || rand10 == 571 || rand10 == 572 || rand10 == 574 || rand10 == 577 || rand10 == 578 || rand10 == 584 || rand10 == 590 || rand10 == 591 || rand10 == 592 || rand10 == 593 || rand10 == 594 || rand10 == 595 || rand10 == 601 || rand10 == 609 || rand10 == 610 || rand10 == 611)
	{
	    return 1;
	}
	if(rand11 == 403 || rand11 == 406 || rand11 == 408 || rand11 == 417 || rand11 == 425 || rand11 == 427 || rand11 == 428 || rand11 == 431 || rand11 == 432 || rand11 == 433 || rand11 == 435 || rand11 == 437 || rand11 == 443 || rand11 == 444 || rand11 == 446 || rand11 == 447 || rand11 == 449 || rand11 == 450 || rand11 == 452 || rand11 == 453 || rand11 == 454 || rand11 == 455 || rand11 == 456 || rand11 == 460 || rand11 == 469 || rand11 == 472 || rand11 == 473 || rand11 == 476 || rand11 == 484 || rand11 == 486 || rand11 == 487 || rand11 == 488 || rand11 == 497 || rand11 == 501 || rand11 == 511 || rand11 == 512 || rand11 == 513 || rand11 == 514 || rand11 == 515 || rand11 == 519 || rand11 == 520 || rand11 == 524 || rand11 == 530 || rand11 == 531 || rand11 == 532 || rand11 == 537 || rand11 == 538 || rand11 == 539 || rand11 == 544 || rand11 == 548 || rand11 == 553 || rand11 == 556 || rand11 == 557 || rand11 == 563 || rand11 == 564 || rand11 == 569 || rand11 == 570 || rand11 == 571 || rand11 == 572 || rand11 == 574 || rand11 == 577 || rand11 == 578 || rand11 == 584 || rand11 == 590 || rand11 == 591 || rand11 == 592 || rand11 == 593 || rand11 == 594 || rand11 == 595 || rand11 == 601 || rand11 == 609 || rand11 == 610 || rand11 == 611)
	{
	    return 1;
	}
	if(rand12 == 403 || rand12 == 406 || rand12 == 408 || rand12 == 417 || rand12 == 425 || rand12 == 427 || rand12 == 428 || rand12 == 431 || rand12 == 432 || rand12 == 433 || rand12 == 435 || rand12 == 437 || rand12 == 443 || rand12 == 444 || rand12 == 446 || rand12 == 447 || rand12 == 449 || rand12 == 450 || rand12 == 452 || rand12 == 453 || rand12 == 454 || rand12 == 455 || rand12 == 456 || rand12 == 460 || rand12 == 469 || rand12 == 472 || rand12 == 473 || rand12 == 476 || rand12 == 484 || rand12 == 486 || rand12 == 487 || rand12 == 488 || rand12 == 497 || rand12 == 501 || rand12 == 511 || rand12 == 512 || rand12 == 513 || rand12 == 514 || rand12 == 515 || rand12 == 519 || rand12 == 520 || rand12 == 524 || rand12 == 530 || rand12 == 531 || rand12 == 532 || rand12 == 537 || rand12 == 538 || rand12 == 539 || rand12 == 544 || rand12 == 548 || rand12 == 553 || rand12 == 556 || rand12 == 557 || rand12 == 563 || rand12 == 564 || rand12 == 569 || rand12 == 570 || rand12 == 571 || rand12 == 572 || rand12 == 574 || rand12 == 577 || rand12 == 578 || rand12 == 584 || rand12 == 590 || rand12 == 591 || rand12 == 592 || rand12 == 593 || rand12 == 594 || rand12 == 595 || rand12 == 601 || rand12 == 609 || rand12 == 610 || rand12 == 611)
	{
	    return 1;
	}
	else
	{
	    AddStaticVehicle(rand,-2535.6863,-602.9896,132.3940,179.8930,randc,randc);
		AddStaticVehicle(rand2,-2531.7119,-603.1975,132.3941,178.8419,randc,randc);
		AddStaticVehicle(rand3,-2528.1055,-603.0823,132.3942,179.9627,randc,randc);
		AddStaticVehicle(rand4,-2524.3159,-602.8835,132.3943,180.0245,randc,randc);
		AddStaticVehicle(rand5,-2520.6118,-603.2492,132.3941,178.7753,randc,randc);
		AddStaticVehicle(rand6,-2516.8125,-603.2576,132.3942,178.7595,randc,randc);
		AddStaticVehicle(rand7,-2513.0564,-602.7173,132.3943,180.0847,randc,randc);
		AddStaticVehicle(rand8,-2509.4929,-603.1609,132.3943,180.1749,randc,randc);
		AddStaticVehicle(rand9,-2505.6755,-602.9529,132.3940,179.9040,randc,randc);
		AddStaticVehicle(rand10,-2501.9355,-603.3615,132.3943,178.8831,randc,randc);
		AddStaticVehicle(rand11,-2498.1853,-603.1845,132.3942,180.8211,randc,randc);
		AddStaticVehicle(rand12,-2494.4438,-603.3358,132.3942,177.8813,randc,randc);
	}
	return 1;
}
But I get
Код:
C:\Servers\SA-MP\gamemodes\MS.pwn(313) : error 075: input line too long (after substitutions)
C:\Servers\SA-MP\gamemodes\MS.pwn(314) : error 075: input line too long (after substitutions)
C:\Servers\SA-MP\gamemodes\MS.pwn(319) : error 075: input line too long (after substitutions)
C:\Servers\SA-MP\gamemodes\MS.pwn(320) : error 075: input line too long (after substitutions)
C:\Servers\SA-MP\gamemodes\MS.pwn(321 -- 322) : warning 215: expression has no effect
C:\Servers\SA-MP\gamemodes\MS.pwn(322) : error 001: expected token: ";", but found ")"
C:\Servers\SA-MP\gamemodes\MS.pwn(322) : warning 217: loose indentation
C:\Servers\SA-MP\gamemodes\MS.pwn(322) : error 029: invalid expression, assumed zero
C:\Servers\SA-MP\gamemodes\MS.pwn(322) : warning 215: expression has no effect
C:\Servers\SA-MP\gamemodes\MS.pwn(323) : warning 217: loose indentation
C:\Servers\SA-MP\gamemodes\MS.pwn(325) : error 075: input line too long (after substitutions)
C:\Servers\SA-MP\gamemodes\MS.pwn(326) : warning 225: unreachable code
C:\Servers\SA-MP\gamemodes\MS.pwn(326) : error 075: input line too long (after substitutions)
C:\Servers\SA-MP\gamemodes\MS.pwn(327 -- 329) : error 029: invalid expression, assumed zero
C:\Servers\SA-MP\gamemodes\MS.pwn(331) : error 075: input line too long (after substitutions)
C:\Servers\SA-MP\gamemodes\MS.pwn(332) : warning 225: unreachable code
C:\Servers\SA-MP\gamemodes\MS.pwn(332) : error 075: input line too long (after substitutions)
C:\Servers\SA-MP\gamemodes\MS.pwn(334) : error 029: invalid expression, assumed zero
C:\Servers\SA-MP\gamemodes\MS.pwn(334) : warning 217: loose indentation
C:\Servers\SA-MP\gamemodes\MS.pwn(334) : warning 215: expression has no effect
C:\Servers\SA-MP\gamemodes\MS.pwn(334) : error 001: expected token: ";", but found ")"
C:\Servers\SA-MP\gamemodes\MS.pwn(334) : error 029: invalid expression, assumed zero
C:\Servers\SA-MP\gamemodes\MS.pwn(334) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
So how can I go about doing this/fixing this?


Re: Making certain ids exempt - kc - 19.07.2010

Something like this should work fine.

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, -1, -1 );
    //Continue like this for as many vehicles as you want
    return 1;
}



Re: Making certain ids exempt - MadeMan - 19.07.2010

Use switch.

Instead of

pawn Код:
if(rand == 403 || rand == 406 || rand == 408 || rand == 417)
{
    return 1;
}
do

pawn Код:
switch(rand)
{
    case 403,406,408,417: return 1;
}



Re: Making certain ids exempt - Mauzen - 19.07.2010

You forgot to close a bracket and added an ; behind to of the ifs.

Btw, it would be better not to check, if the random id is one that you want to have, but to check if it is one you dont want to have. And if it is so, create a new random id for that variable.
This would make the lines a lot shorter, so you would not exceed the max length.

Edit: corrected


Re: Making certain ids exempt - Яσскѕтая - 19.07.2010

I did kc's and it works great but still used the random car color, but there all spawning the same color.


Re: Making certain ids exempt - kc - 19.07.2010

You mean you are using your randc variable? I am guessing that all of the colours are pink, right? :P

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;
}
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.


Re: Making certain ids exempt - Яσскѕтая - 19.07.2010

No they were all blue and this works great, thanks a bunch KC.


Re: Making certain ids exempt - Mauzen - 19.07.2010

Quote:
Originally Posted by ******
Посмотреть сообщение
No you can't - did you try this code?
Oops right, sorry, this would always return true.