SA-MP Forums Archive
[Include] Police Infernus - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Police Infernus (/showthread.php?tid=663380)



Police Infernus - m1n1vv - 29.01.2019

Video:


Download: github.com
Version: 0.2
Author: m1n1vv


Re: Police Infernus - Eoussama - 29.01.2019

Pretty dope stuff man, I'd like to see that repository grow to have more vehicle customizations.


Re: Police Infernus - m1n1vv - 29.01.2019

Update
- Made symmetrical flashers under the headlights and improved flashing lights.

Quote:
Originally Posted by Eoussama
Посмотреть сообщение
Pretty dope stuff man, I'd like to see that repository grow to have more vehicle customizations.
What are the settings?


Re: Police Infernus - Pottus - 29.01.2019

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



Re: Police Infernus - m1n1vv - 29.01.2019

Quote:
Originally Posted by Pottus
Посмотреть сообщение
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;
}
Oh, by the way. Forgot to do it.


Re: Police Infernus - Pottus - 29.01.2019

How can you forget? You can see yourself writing it.


Re: Police Infernus - FinStar - 29.01.2019

Quote:
Originally Posted by Pottus
Посмотреть сообщение
How can you forget? You can see yourself writing it.
It's true.




Re: Police Infernus - m1n1vv - 29.01.2019

Quote:
Originally Posted by Pottus
Посмотреть сообщение
How can you forget? You can see yourself writing it.
Inattention. Initially there was no loop with assignment at all.


Re: Police Infernus - vytioxa902 - 11.03.2019

static
police_infernus[MAX_VEHICLES][MAX_INFERNUS_OBJECTS] = {INVALID_OBJECT_ID, ...};

says: error 029: invalid expression, assumed zero

how to fix?