Jump to content
  • 0

Intreabare


Scott_Williams

Question

Salut, incerc sa fac de ex masinile de politie pe modele de masina de ex:

public IsACopCar(carid)
{
	if((carid >= 252) && (carid <= 269) || carid == 270 || carid == 271 || carid == 272 || carid == 273 || carid == 274 || carid == 275 || carid == 276 || carid == 277 || carid == 278 || carid == 279 || carid == 280 || carid == 281 || carid == 282 || carid == 283 || carid == 284 || carid == 285)
	{
		return 1;
	}
	return 0;
}

Si in loc de carid == id sa pun vehiclemodel sau cum sa pun? == id-ul modelului vehiculului de ex nrg sa fie doar ptr cop 522 ma puteti ajuta?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

public IsACopCar( carid )
{
	if( ( carid >= 252 ) && ( carid <= 269 ) || carid == 270 || carid == 271 || carid == 272 || carid == 273 || carid == 274 || carid == 275 || carid == 276 || carid == 277 || carid == 278 || carid == 279 || carid == 280 || carid == 281 || carid == 282 || carid == 283 || carid == 284 || carid == 285 || carid == 522 ) return ( 1 );
	return ( 0 );
}

Vezi, am adaugat acel carid == 522.

142sj0l.png

Underground-GFX

Link to comment
Share on other sites

public IsACopCar( carid )
{
	if( ( carid >= 252 ) && ( carid <= 269 ) || carid == 270 || carid == 271 || carid == 272 || carid == 273 || carid == 274 || carid == 275 || carid == 276 || carid == 277 || carid == 278 || carid == 279 || carid == 280 || carid == 281 || carid == 282 || carid == 283 || carid == 284 || carid == 285 || carid == 522 ) return ( 1 );
	return ( 0 );
}
Vezi, am adaugat acel carid == 522.
of, of, of Fa asa:
public IsACopCar( carid )
{
	new model = GetVehicleModel( carid );
	if( model == MODEL1 || model == MODEL2 || model == MODEL3 || ETC. ) return 1;

	return 0;
}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.