05.05.2012, 04:05
Right on my server when i go into the LSPD and do /door the door open's but rotates at the same time, so when i close them, they stay rotated and do not close properly
Код:
LSPDDoor1 = CreateDynamicObject(1569, 239.5439453125, 116.099609375, 1002.21875, 0, 0, 90, -1, 10, -1, 150.0); LSPDDoor4 = CreateDynamicObject(1569, 239.54446411133, 119.09854125977, 1002.21875, 0, 0, 270, -1, 10, -1, 150.0); LSPDDoor2 = CreateDynamicObject(1569, 253.20678710938, 107.55118560791, 1002.21875, 0, 0, 90, -1, 10, -1, 150.0); LSPDDoor5 = CreateDynamicObject(1569, 253.2060546875, 110.5517578125, 1002.21875, 0, 0, 270, -1, 10, -1, 150.0); LSPDDoor3 = CreateDynamicObject(1569, 216.35855102539, 116.49627685547, 998.015625, 0, 0, 0, -1, 10, -1, 150.0); LSPDDoor6 = CreateDynamicObject(1569, 219.33728027344, 116.49627685547, 998.015625, 0, 0, 180, -1, 10, -1, 150.0);
Код:
if(LSPDDoor1Open == 0) { format(string, sizeof(string), "* %s unlocks the door before sliding it open.", GetName(playerid)); NearByMessage(playerid, NICESKY, string); MoveDynamicObject(LSPDDoor1, 239.5439453125, 114.099609375, 1002.21875, 1); MoveDynamicObject(LSPDDoor4, 239.54446411133, 121.09854125977, 1002.21875, 1); LSPDDoor1Open = 1; } else { format(string, sizeof(string), "* %s slides the doors shut before locking them.", GetName(playerid)); NearByMessage(playerid, NICESKY, string); MoveDynamicObject(LSPDDoor1, 239.5439453125, 116.099609375, 1002.21875, 1); MoveDynamicObject(LSPDDoor4, 239.54446411133, 119.09854125977, 1002.21875, 1); LSPDDoor1Open = 0; } } else if(GetDistance(Positions[0][0], Positions[0][1], Positions[0][2], Positions[2][0], Positions[2][1], Positions[2][2]) < 10.0) { if(LSPDDoor2Open == 0) { format(string, sizeof(string), "* %s unlocks the door before sliding it open.", GetName(playerid)); NearByMessage(playerid, NICESKY, string); MoveDynamicObject(LSPDDoor2, 253.20678710938, 105.55118560791, 1002.21875, 1); MoveDynamicObject(LSPDDoor5, 253.2060546875, 112.5517578125, 1002.21875, 1); LSPDDoor2Open = 1; } else { format(string, sizeof(string), "* %s slides the doors shut before locking them.", GetName(playerid)); NearByMessage(playerid, NICESKY, string); MoveDynamicObject(LSPDDoor2, 253.20678710938, 107.55118560791, 1002.21875, 1); MoveDynamicObject(LSPDDoor5, 253.2060546875, 110.5517578125, 1002.21875, 1); LSPDDoor2Open = 0; } } else if(GetDistance(Positions[0][0], Positions[0][1], Positions[0][2], Positions[3][0], Positions[3][1], Positions[3][2]) < 10.0) { if(LSPDDoor3Open == 0) { format(string, sizeof(string), "* %s unlocks the door before sliding it open.", GetName(playerid)); NearByMessage(playerid, NICESKY, string); MoveDynamicObject(LSPDDoor3, 214.35855102539, 116.49627685547, 998.015625, 1); MoveDynamicObject(LSPDDoor6, 221.33728027344, 116.49627685547, 998.015625, 1); LSPDDoor3Open = 1; } else { format(string, sizeof(string), "* %s slides the doors shut before locking them.", GetName(playerid)); NearByMessage(playerid, NICESKY, string); MoveDynamicObject(LSPDDoor3, 216.35855102539, 116.49627685547, 998.015625, 1); MoveDynamicObject(LSPDDoor6, 219.33728027344, 116.49627685547, 998.015625, 1); LSPDDoor3Open = 0; }
Код:
new LSPDDoor1, LSPDDoor2, LSPDDoor3, LSPDDoor4, LSPDDoor5, LSPDDoor6, LSPDDoor1Open = 0, LSPDDoor2Open = 0, LSPDDoor3Open = 0;