03.12.2015, 14:34
(
Последний раз редактировалось RIDE2DAY; 18.07.2016 в 00:40.
)
Hello guys, as I decided to use the LVPD interior I fixed it because it has some non-solid zones... nothing special but it's okay if you wanna use it, that's why I share it.
Watch the video to see more:
http://www.youtube.com/watch?v=xcG24AgWhlY
IMPORTANT: some doors appear opened in the video but they are closed by default (I opened them before I started to record).
Objects removed:
Objects added:
I used rBits to save the ids of the doors which move, here's the code I used in my gamemode (adapt it by yourself):
Some screenshots:


That's all people, I tried to make a clean map. Excuse my English by the way.
Regards.
Watch the video to see more:
http://www.youtube.com/watch?v=xcG24AgWhlY
IMPORTANT: some doors appear opened in the video but they are closed by default (I opened them before I started to record).
Objects removed:
- Beds from the cells (non-solid).
- Cell doors (all them are the same object, and some are closed).
PHP код:
RemoveBuildingForPlayer(playerid, 14856, 198.4688, 168.6797, 1003.8984, 0.25); /* LVPD Cell Doors */
RemoveBuildingForPlayer(playerid, 1771, 190.6406, 174.7422, 1002.6875, 0.25); /* LVPD Cell Bed */
RemoveBuildingForPlayer(playerid, 1771, 194.8750, 174.7422, 1002.6875, 0.25); /* LVPD Cell Bed */
RemoveBuildingForPlayer(playerid, 1771, 199.1328, 174.7422, 1002.6875, 0.25); /* LVPD Cell Bed */
RemoveBuildingForPlayer(playerid, 1771, 188.4922, 162.0234, 1002.6875, 0.25); /* LVPD Cell Bed */
RemoveBuildingForPlayer(playerid, 1771, 192.7266, 162.0234, 1002.6875, 0.25); /* LVPD Cell Bed */
RemoveBuildingForPlayer(playerid, 1771, 196.9844, 162.0234, 1002.6875, 0.25); /* LVPD Cell Bed */
- New cell doors to be able to open/close.
- Objects behind the walls to make some zones solid.
PHP код:
/* Door #1 */
CreateDynamicObject(19304,209.0360000,179.1378000,1005.1469700,0.0000000,0.0000000,-90.0000000,-1,3);
CreateDynamicObject(19303,209.0360000,180.0157900,1003.2750200,0.0000000,0.0000000,-90.0000000,-1,3);
Bit16_Set(g_DoorsLVPD, 1, CreateDynamicObject(19302,209.0959900,178.2598000,1003.2750200,0.0000000,0.0000000,-90.0000000,-1,3));
/* Door #2 */
CreateDynamicObject(19304,209.0360000,158.2357900,1005.1469700,0.0000000,0.0000000,-90.0000000,-1,3);
CreateDynamicObject(19303,209.0360000,159.1138000,1003.2750200,0.0000000,0.0000000,-90.0000000,-1,3);
Bit16_Set(g_DoorsLVPD, 2, CreateDynamicObject(19302,209.0959900,157.3578000,1003.2750200,0.0000000,0.0000000,-90.0000000,-1,3));
/* Cell #1 */
CreateDynamicObject(19304,198.0640000,177.0448000,1005.1469700,0.0000000,0.0000000,0.00000000,-1,3);
CreateDynamicObject(19303,197.1860000,177.0448000,1003.2750200,0.0000000,0.0000000,0.0000000,-1,3);
Bit16_Set(g_DoorsLVPD, 3, CreateDynamicObject(19302,198.9420000,177.1048000,1003.2750200,0.0000000,0.0000000,0.0000000,-1,3));
/* Cell #2 */
CreateDynamicObject(19304,193.8179900,177.0448000,1005.1469700,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19303,192.9400000,177.0448000,1003.2750200,0.0000000,0.0000000,0.0000000,-1,3);
Bit16_Set(g_DoorsLVPD, 4, CreateDynamicObject(19302,194.6960000,177.1048000,1003.2750200,0.0000000,0.0000000,0.0000000,-1,3));
/* Cell #3 */
CreateDynamicObject(19304,189.5789900,177.0448000,1005.1469700,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19303,188.7010000,177.0448000,1003.2750200,0.0000000,0.0000000,0.0000000,-1,3);
Bit16_Set(g_DoorsLVPD, 5, CreateDynamicObject(19302,190.4570000,177.1048000,1003.2750200,0.0000000,0.0000000,0.0000000,-1,3));
/* Cell #4 */
CreateDynamicObject(19304,198.0679900,160.3268000,1005.1469700,0.0000000,0.0000000,180.0000000,-1,3);
CreateDynamicObject(19303,198.9460000,160.3268000,1003.2750200,0.0000000,0.0000000,180.0000000,-1,3);
Bit16_Set(g_DoorsLVPD, 6, CreateDynamicObject(19302,197.1900000,160.2668000,1003.2750200,0.0000000,0.0000000,180.0000000,-1,3));
/* Cell #5 */
CreateDynamicObject(19304,193.8280000,160.3268000,1005.1469700,0.0000000,0.0000000,180.0000000,-1,3);
CreateDynamicObject(19303,194.7059900,160.3268000,1003.2750200,0.0000000,0.0000000,180.0000000,-1,3);
Bit16_Set(g_DoorsLVPD, 7, CreateDynamicObject(19302,192.9500000,160.2668000,1003.2750200,0.0000000,0.0000000,180.0000000,-1,3));
/* Cell #6 */
CreateDynamicObject(19304,189.5809900,160.3268000,1005.1469700,0.0000000,0.0000000,180.0000000,-1,3);
CreateDynamicObject(19303,190.4590000,160.3268000,1003.2750200,0.0000000,0.0000000,180.0000000,-1,3);
Bit16_Set(g_DoorsLVPD, 8, CreateDynamicObject(19302,188.7030000,160.2668000,1003.2750200,0.0000000,0.0000000,180.0000000,-1,3));
/* Floor and walls */
CreateDynamicObject(19379,195.0980100,161.0397000,1001.9210800,0.0000000,90.0000000,0.0000000,-1,3);
CreateDynamicObject(19462,188.0980100,161.0397000,1001.9210800,0.0000000,90.0000000,0.0000000,-1,3);
CreateDynamicObject(19379,195.0980100,176.3197000,1001.9210800,0.0000000,90.0000000,0.0000000,-1,3);
CreateDynamicObject(19462,188.0980100,176.3197000,1001.9210800,0.0000000,90.0000000,0.0000000,-1,3);
CreateDynamicObject(19428,195.9346900,176.3210000,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19428,191.6747000,176.3210000,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19428,195.9346900,161.0410000,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19428,191.6747000,161.0410000,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19447,191.4247000,172.3170000,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19447,187.7327000,172.3170000,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19447,191.9667100,172.3170000,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19428,196.2127100,176.3210000,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19428,195.6687000,176.3210000,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19428,196.2207000,161.0410000,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19447,191.9787000,165.0549900,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19447,191.4306900,165.0549900,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19447,195.6806900,165.0549900,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19447,187.7317000,165.0549900,1003.7678200,0.0000000,0.0000000,0.0000000,-1,3);
CreateDynamicObject(19447,190.9527000,164.0290100,1003.7678200,0.0000000,0.0000000,90.0000000,-1,3);
PHP код:
/* Variables. */
new Bit1:g_DoorStateLVPD<9>;
new Bit16:g_DoorsLVPD<9>;
/* Script to open/close doors. */
if(IsPlayerInRangeOfPoint(playerid, 1.5, 209.0959900, 178.2598000, 1003.2750200) && GetPlayerInterior(playerid) == 3) /* Door #1 LVPD */
{
if(Bit1_Get(g_DoorStateLVPD, 1))
{
Bit1_Set(g_DoorStateLVPD, 1, false);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 1), 209.0959900, 178.2598000, 1003.2750200, 0.8, 0.0, 0.0, -90.0);
cmd_me(playerid, "tira de la puerta y la cierra."); /* This means it's closing. */
}
else
{
Bit1_Set(g_DoorStateLVPD, 1, true);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 1), 209.0959900, 180.0157900, 1003.2750200, 0.8, 0.0, 0.0, -90.0);
cmd_me(playerid, "mete la llave en la cerradura, la gira y abre la puerta."); /* This means it's opening. */
}
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, 209.0959900,157.3578000,1003.2750200) && GetPlayerInterior(playerid) == 3) /* Door #2 LVPD */
{
if(Bit1_Get(g_DoorStateLVPD, 2))
{
Bit1_Set(g_DoorStateLVPD, 2, false);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 2), 209.09599, 157.3578, 1003.27502, 0.8, 0.0, 0.0, -90.0);
cmd_me(playerid, "tira de la puerta y la cierra.");
}
else
{
Bit1_Set(g_DoorStateLVPD, 2, true);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 2), 209.09599, 159.1138, 1003.27502, 0.8, 0.0, 0.0, -90.0);
cmd_me(playerid, "mete la llave en la cerradura, la gira y abre la puerta.");
}
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, 198.9420000, 177.1048000, 1003.2750200) && GetPlayerInterior(playerid) == 3) /* Cell #1 LVPD */
{
if(Bit1_Get(g_DoorStateLVPD, 3))
{
Bit1_Set(g_DoorStateLVPD, 3, false);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 3), 198.9420000, 177.1048000, 1003.2750200, 0.8, 0.0,0.0,0.0);
cmd_me(playerid, "tira de la puerta de la celda y la cierra.");
}
else
{
Bit1_Set(g_DoorStateLVPD, 3, true);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 3), 197.1860000, 177.1048000, 1003.2750200, 0.8, 0.0,0.0,0.0);
cmd_me(playerid, "mete la llave en la cerradura, la gira y abre la puerta de la celda.");
}
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, 194.6960000, 177.1048000, 1003.2750200) && GetPlayerInterior(playerid) == 3) /* Cell #2 LVPD */
{
if(Bit1_Get(g_DoorStateLVPD, 4))
{
Bit1_Set(g_DoorStateLVPD, 4, false);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 4), 194.6960000, 177.1048000, 1003.2750200, 0.8, 0.0,0.0,0.0);
cmd_me(playerid, "tira de la puerta de la celda y la cierra.");
}
else
{
Bit1_Set(g_DoorStateLVPD, 4, true);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 4), 192.9400000, 177.1048000, 1003.2750200, 0.8, 0.0,0.0,0.0);
cmd_me(playerid, "mete la llave en la cerradura, la gira y abre la puerta de la celda.");
}
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, 190.4570000, 177.1048000, 1003.2750200) && GetPlayerInterior(playerid) == 3) /* Cell #3 LVPD */
{
if(Bit1_Get(g_DoorStateLVPD, 5))
{
Bit1_Set(g_DoorStateLVPD, 5, false);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 5), 190.4570000, 177.1048000, 1003.2750200, 0.8, 0.0,0.0,0.0);
cmd_me(playerid, "tira de la puerta de la celda y la cierra.");
}
else
{
Bit1_Set(g_DoorStateLVPD, 5, true);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 5), 188.7010000, 177.1048000, 1003.2750200, 0.8, 0.0,0.0,0.0);
cmd_me(playerid, "mete la llave en la cerradura, la gira y abre la puerta de la celda.");
}
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, 197.1900000,160.2668000,1003.2750200) && GetPlayerInterior(playerid) == 3) /* Cell #4 LVPD */
{
if(Bit1_Get(g_DoorStateLVPD, 6))
{
Bit1_Set(g_DoorStateLVPD, 6, false);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 6), 197.1900000, 160.2668000, 1003.2750200, 0.8, 0.0, 0.0, 180.0);
cmd_me(playerid, "tira de la puerta de la celda y la cierra.");
}
else
{
Bit1_Set(g_DoorStateLVPD, 6, true);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 6), 198.9460000, 160.2668000, 1003.2750200, 0.8, 0.0, 0.0, 180.0);
cmd_me(playerid, "mete la llave en la cerradura, la gira y abre la puerta de la celda.");
}
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, 192.9500000,160.2668000,1003.2750200) && GetPlayerInterior(playerid) == 3) /* Cell #5 LVPD */
{
if(Bit1_Get(g_DoorStateLVPD, 7))
{
Bit1_Set(g_DoorStateLVPD, 7, false);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 7), 192.9500000,160.2668000,1003.2750200, 0.8, 0.0, 0.0, 180.0);
cmd_me(playerid, "tira de la puerta de la celda y la cierra.");
}
else
{
Bit1_Set(g_DoorStateLVPD, 7, true);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 7), 194.7059900,160.2668000,1003.2750200, 0.8, 0.0, 0.0, 180.0);
cmd_me(playerid, "mete la llave en la cerradura, la gira y abre la puerta de la celda.");
}
}
else if(IsPlayerInRangeOfPoint(playerid, 1.5, 188.7030000, 160.2668000, 1003.2750200) && GetPlayerInterior(playerid) == 3) /* Cell #6 LVPD */
{
if(Bit1_Get(g_DoorStateLVPD, 8))
{
Bit1_Set(g_DoorStateLVPD, 8, false);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 8), 188.7030000,160.2668000,1003.2750200, 0.8, 0.0, 0.0, 180.0);
cmd_me(playerid, "tira de la puerta de la celda y la cierra.");
}
else
{
Bit1_Set(g_DoorStateLVPD, 8, true);
MoveDynamicObject(Bit16_Get(g_DoorsLVPD, 8), 190.4590000,160.2668000,1003.2750200, 0.8, 0.0, 0.0, 180.0);
cmd_me(playerid, "mete la llave en la cerradura, la gira y abre la puerta de la celda.");
}
}


That's all people, I tried to make a clean map. Excuse my English by the way.
Regards.