[Map] Remapped LSPD Cells
#1

This is a very basic bit of mapping that I've done which replaces the old cells with new ones. Place the pieces of code below in their correct positions.

Making the cell door move. Please note, you'll have to make this into a command yourself or make it work with a key.
Код:
if(IsPlayerInRangeOfPoint(playerid, 1, 266.36240, 87.45930, 1001.29077))
{
	if(celldoor1 == 0)
	{
		MoveDynamicObject(lspdcell1, 266.36240, 85.68930, 1001.29077, 1.50);
		celldoor1 = 1;
	}
	else
	{
		MoveDynamicObject(lspdcell1,266.36240, 87.45930, 1001.29077, 1.50);
		celldoor1 = 0;
	}
}
if(IsPlayerInRangeOfPoint(playerid, 1, 266.36240, 82.94550, 1001.29077))
{
	if(celldoor2 == 0)
	{
		MoveDynamicObject(lspdcell2, 266.36240, 81.21280, 1001.29077, 1.50);
		celldoor2 = 1;
	}
	else
	{
		MoveDynamicObject(lspdcell2,266.36240, 82.94550, 1001.29077, 1.50);
		celldoor2 = 0;
	}
}
The 'new's
Код:
new lspdcell1;
new lspdcell2;
new celldoor1 = 0;
new celldoor2 = 0;
The mapping
Код:
CreateDynamicObject(19302, 266.36240, 85.68930, 1001.29077,   0.00000, 0.00000, 90.00000);
lspdcell1 = CreateDynamicObject(19302, 266.36240, 87.45930, 1001.29077,   0.00000, 0.00000, 270.00000);
CreateDynamicObject(19302, 266.36240, 81.21280, 1001.29077,   0.00000, 0.00000, 90.00000);
lspdcell2 = CreateDynamicObject(19302, 266.36240, 82.94550, 1001.29077,   0.00000, 0.00000, 270.00000);
CreateDynamicObject(19302, 266.36240, 78.46120, 1001.29077,   0.00000, 0.00000, 270.00000);
CreateDynamicObject(19302, 266.36240, 76.72040, 1001.29077,   0.00000, 0.00000, 90.00000);
The building removal (Placed under OnPlayerConnect usually)
Код:
RemoveBuildingForPlayer(playerid, 14843, 266.3516, 81.1953, 1001.2813, 0.25);
Thanks and enjoy!
Reply
#2

This is mostly a filterscript, but good job anyway!
Reply
#3

Yeah I kind of thought that, I started it off to be a map and then added the moving cells. Thanks for the feedback
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)