[Include] Police Infernus
#4

Some of your code looks weird if you are directly referencing array indexes without using a loop you are doing something wrong.

Код:
stock DestroyPoliceInfernus(vehicleid)
{
	DestroyVehicle(vehicleid);

	DestroyDynamicObject(police_infernus[vehicleid][0]);
	DestroyDynamicObject(police_infernus[vehicleid][1]);
	DestroyDynamicObject(police_infernus[vehicleid][2]);
	DestroyDynamicObject(police_infernus[vehicleid][3]);
	DestroyDynamicObject(police_infernus[vehicleid][4]);
	DestroyDynamicObject(police_infernus[vehicleid][5]);
	DestroyDynamicObject(police_infernus[vehicleid][6]);
	DestroyDynamicObject(police_infernus[vehicleid][7]);
	DestroyDynamicObject(police_infernus[vehicleid][8]);
	DestroyDynamicObject(police_infernus[vehicleid][9]);
	DestroyDynamicObject(police_infernus[vehicleid][10]);
	DestroyDynamicObject(police_infernus[vehicleid][11]);

	for (new i = 0; i < MAX_INFERNUS_OBJECTS; i++)
		police_infernus[vehicleid][i] = INVALID_OBJECT_ID;

	return 1;
}
Код:
static DestroyPoliceInfernus(vehicleid)
{
	DestroyVehicle(vehicleid);
	for (new i = 0; i < MAX_INFERNUS_OBJECTS; i++)
	{
		DestroyDynamicObject(police_infernus[vehicleid][i];
		police_infernus[vehicleid][i] = INVALID_OBJECT_ID;
	}
	return 1;
}
Reply


Messages In This Thread
Police Infernus - by m1n1vv - 29.01.2019, 17:30
Re: Police Infernus - by Eoussama - 29.01.2019, 19:08
Re: Police Infernus - by m1n1vv - 29.01.2019, 19:32
Re: Police Infernus - by Pottus - 29.01.2019, 19:49
Re: Police Infernus - by m1n1vv - 29.01.2019, 20:12
Re: Police Infernus - by Pottus - 29.01.2019, 20:18
Re: Police Infernus - by FinStar - 29.01.2019, 20:21
Re: Police Infernus - by m1n1vv - 29.01.2019, 20:59
Re: Police Infernus - by vytioxa902 - 11.03.2019, 23:10

Forum Jump:


Users browsing this thread: 4 Guest(s)