[Include] Police Infernus
#1

Video:


Download: github.com
Version: 0.2
Author: m1n1vv
Reply
#2

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

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?
Reply
#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
#5

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.
Reply
#6

How can you forget? You can see yourself writing it.
Reply
#7

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

Reply
#8

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.
Reply
#9

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

says: error 029: invalid expression, assumed zero

how to fix?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)