Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Remote Control Circuit Filterscript By Ravian aka IceMeteor
- // You can modify this script, but don't remove the credits
- // Last Modified by Ravian at July 30th, 2012. 17.10 WIB (West Indonesian time)
- #include <a_samp>
- #include <zcmd>
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_PURPLE 0xC2A2DAAA
- #define COLOR_PINK 0xFF66FFAA
- #define COLOR_BLUE 0x2641FEAA
- #define MAX_RC 4
- new elevator, door3, door2, door1;
- new ElevatorStatus;
- //new go[6];
- //new gostatus[6];
- //new gate;
- //new GateStatus;
- new Text3D:first, Text3D:second, Text3D:third, Text3D:flyingtext[4];
- new rcid[8];
- new RCUsed[8];
- new rmin, rsec, rmilsec;
- new info;
- new racetime, gotime;
- new Float:SpawnPos[4][3] =
- {
- {40.65, 622.09, 7.48},
- {40.65, 620.72, 7.48},
- {40.65, 619.37, 7.48},
- {40.65, 617.77, 7.48}
- };
- public OnFilterScriptInit()
- {
- #pragma tabsize 0
- // Tag
- print("\n -------------------------------------");
- print(" | |");
- print(" | Remote Control Circuit Filterscript |");
- print(" | by Ravian - IceMeteor |");
- print(" | |");
- print(" -------------------------------------\n");
- // Map
- CreateObject(7665, 62.77, 600.52, 8.24, 0.00, 0.00, 0.00);
- CreateObject(8838, 36.97, 593.46, 12.67, 0.00, 0.00, 90.00);
- CreateObject(7665, 62.77, 600.51, 8.24, 180.00, 180.00, 0.00);
- CreateObject(3850, 39.23, 600.14, 11.78, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.22, 596.67, 11.78, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.21, 593.19, 11.78, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.20, 589.78, 11.78, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.19, 586.36, 11.78, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.18, 582.86, 11.78, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.16, 579.36, 11.78, 0.00, 0.00, 0.00);
- CreateObject(8838, 36.97, 593.46, 9.63, 0.00, 0.00, 90.00);
- CreateObject(5820, 35.23, 575.19, 7.63, 0.00, 0.00, 0.00);
- CreateObject(3850, 38.43, 590.66, 7.55, 0.00, 0.00, 0.00);
- CreateObject(3850, 38.43, 594.09, 7.55, 0.00, -0.18, 0.00);
- CreateObject(3850, 38.43, 597.59, 7.55, 0.00, 0.00, 0.00);
- CreateObject(3850, 38.43, 601.05, 7.55, 0.00, 0.00, 0.00);
- CreateObject(3850, 38.43, 604.51, 7.55, 0.00, 0.00, 0.00);
- CreateObject(3850, 38.44, 607.98, 7.55, 0.00, 0.00, 0.00);
- CreateObject(3850, 38.43, 587.23, 7.55, 0.06, 0.00, 0.00);
- CreateObject(3850, 38.43, 583.76, 7.55, 0.00, 0.00, 0.00);
- CreateObject(3850, 38.44, 580.28, 7.55, 0.00, 0.00, 0.00);
- CreateObject(970, 34.99, 607.60, 11.78, 0.00, 0.00, 90.00);
- CreateObject(3350, 38.60, 578.12, 14.19, 0.00, 0.00, 135.00);
- CreateObject(3350, 35.00, 623.11, 8.06, 0.00, 0.00, 45.00);
- CreateObject(3350, 90.53, 623.03, 8.06, 0.00, 0.00, -45.00);
- CreateObject(3350, 90.30, 577.92, 8.06, 0.00, 0.00, -135.00);
- CreateObject(2184, 39.79, 609.33, 11.15, 0.00, 0.00, 90.00);
- CreateObject(1806, 38.11, 610.09, 11.15, 0.00, 0.00, -110.00);
- CreateObject(1806, 37.98, 610.94, 11.15, 0.00, 0.00, -70.00);
- CreateObject(17522, 68.54, 603.59, -21.79, 0.00, -0.06, 90.00);
- CreateObject(3406, 34.54, 579.29, 5.15, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 581.27, 5.15, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 583.18, 5.15, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 585.17, 5.15, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 587.17, 5.12, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 589.16, 5.12, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 591.15, 5.12, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 593.16, 5.12, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 595.17, 5.12, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 597.18, 5.12, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 599.19, 5.12, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 601.21, 5.12, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 603.23, 5.12, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 605.21, 5.12, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 607.22, 5.08, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 609.16, 5.02, 0.00, 0.00, 0.00);
- CreateObject(970, 34.99, 599.39, 11.78, 0.00, 0.00, 90.00);
- CreateObject(970, 34.99, 595.29, 11.78, 0.00, 0.00, 90.00);
- CreateObject(970, 34.99, 591.20, 11.78, 0.00, 0.00, 90.00);
- CreateObject(970, 34.99, 587.10, 11.78, 0.00, 0.00, 90.00);
- CreateObject(970, 34.99, 583.01, 11.78, 0.00, 0.00, 90.00);
- CreateObject(970, 34.99, 579.28, 11.78, 0.00, 0.00, 90.00);
- CreateObject(14874, 36.47, 612.72, 9.29, 0.00, 0.00, 90.00);
- CreateObject(0, 42.69, 608.84, 10.51, 0.00, 0.00, 359.29);
- CreateObject(3117, 38.44, 610.35, 11.02, 0.00, 0.00, 90.00);
- CreateObject(3440, 40.14, 610.96, 8.54, 0.00, 0.00, 0.00);
- CreateObject(3117, 38.98, 607.23, 11.02, 0.00, 0.00, -107.25);
- CreateObject(3850, 40.32, 610.28, 11.70, 0.00, 0.00, 0.00);
- CreateObject(3117, 39.44, 610.35, 11.02, 0.00, 0.00, 90.00);
- CreateObject(3850, 39.83, 606.99, 11.70, 0.00, 0.00, -17.00);
- CreateObject(3850, 39.23, 603.54, 11.78, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 611.13, 5.02, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 612.83, 5.02, 0.00, 0.00, 0.00);
- CreateObject(3850, 38.44, 611.44, 7.55, 0.00, 0.00, 0.00);
- CreateObject(3406, 34.54, 614.84, 5.02, 0.00, 0.00, 0.00);
- CreateObject(979, 47.40, 616.99, 7.12, 0.00, 0.00, 2.64);
- CreateObject(979, 55.10, 613.80, 7.12, 0.00, 0.00, 312.59);
- CreateObject(979, 42.94, 606.36, 7.12, 0.00, 0.00, 79.59);
- CreateObject(978, 60.55, 613.89, 7.12, 0.00, 0.00, 115.47);
- CreateObject(978, 55.13, 620.71, 7.12, 0.00, 0.00, 140.55);
- CreateObject(979, 56.94, 606.26, 7.12, 0.00, 0.00, 256.97);
- CreateObject(978, 61.12, 605.51, 7.12, 0.00, 0.00, 75.02);
- CreateObject(979, 56.86, 598.18, 7.12, 0.00, 0.00, 282.59);
- CreateObject(978, 63.60, 604.13, 7.12, 0.00, 0.00, 215.62);
- CreateObject(979, 68.49, 600.79, 7.12, 0.00, 0.00, 54.40);
- CreateObject(979, 62.17, 595.40, 7.12, 0.00, 0.00, 23.82);
- CreateObject(978, 65.95, 611.12, 7.12, 0.00, 0.00, 287.89);
- CreateObject(979, 70.95, 609.13, 7.12, 0.00, 0.00, 92.09);
- CreateObject(978, 67.99, 618.96, 7.12, 0.00, 0.00, 225.38);
- CreateObject(979, 74.52, 616.50, 7.12, 0.00, 0.00, 33.27);
- CreateObject(979, 81.35, 615.40, 7.12, 0.00, 0.00, 308.50);
- CreateObject(978, 89.38, 614.55, 7.12, 0.00, 0.00, 98.21);
- CreateObject(979, 83.62, 606.89, 7.12, 0.00, 0.00, 101.98);
- CreateObject(979, 84.22, 606.98, 7.12, 0.00, 0.00, 271.79);
- CreateObject(978, 79.95, 602.11, 7.12, 0.00, 0.00, 282.47);
- CreateObject(978, 77.54, 601.94, 7.12, 0.00, 0.00, 68.32);
- CreateObject(979, 78.43, 611.78, 7.12, 0.00, 0.00, 167.95);
- CreateObject(979, 73.31, 608.18, 7.12, 0.00, 0.00, 261.96);
- CreateObject(979, 71.28, 600.71, 7.12, 0.00, 0.00, 251.51);
- CreateObject(979, 80.91, 588.81, 7.12, 0.00, 0.00, 304.19);
- CreateObject(978, 79.65, 595.56, 7.12, 0.00, 0.00, 149.39);
- CreateObject(978, 74.12, 594.53, 7.12, 0.00, 0.00, 157.38);
- CreateObject(978, 89.11, 582.40, 7.120, 0.00, 0.00, 89.51);
- CreateObject(979, 78.58, 585.93, 7.12, 0.00, 0.00, 179.17);
- CreateObject(978, 74.73, 580.10, 7.12, 0.00, 0.00, 339.62);
- CreateObject(979, 69.82, 587.20, 7.12, 0.00, 0.00, 167.03);
- CreateObject(978, 75.72, 622.48, 7.12, 0.00, 0.00, 179.84);
- CreateObject(978, 84.63, 620.93, 7.12, 0.00, 0.00, 162.25);
- CreateObject(978, 89.94, 605.23, 7.12, 0.00, 0.00, 89.61);
- CreateObject(978, 85.45, 599.15, 7.12, 0.00, 0.00, 16.76);
- CreateObject(978, 86.33, 589.97, 7.12, 0.00, 0.00, 128.60);
- CreateObject(978, 84.07, 578.40, 7.12, 0.00, 0.00, 0.04);
- CreateObject(978, 66.31, 579.95, 7.12, 0.00, 0.00, 22.46);
- CreateObject(979, 61.37, 586.41, 7.12, 0.00, 0.00, 204.56);
- CreateObject(978, 57.73, 578.45, 7.12, 0.00, 0.00, 1.11);
- CreateObject(979, 56.55, 589.00, 7.12, 0.00, 0.00, 102.46);
- CreateObject(978, 52.23, 582.94, 7.12, 0.00, 0.00, 285.32);
- CreateObject(979, 54.57, 606.91, 7.12, 0.00, 0.00, 94.15);
- CreateObject(979, 55.18, 597.91, 7.12, 0.00, 0.00, 94.15);
- CreateObject(979, 49.28, 611.98, 7.12, 0.00, 0.00, 179.42);
- CreateObject(978, 51.44, 591.99, 7.12, 0.00, 0.00, 265.74);
- CreateObject(978, 51.55, 601.15, 7.12, 0.00, 0.00, 274.30);
- CreateObject(978, 49.64, 601.16, 7.12, 0.00, 0.00, 67.35);
- CreateObject(979, 44.53, 607.10, 7.12, 0.00, 0.00, 265.70);
- CreateObject(978, 47.85, 592.62, 7.12, 0.00, 0.00, 89.38);
- CreateObject(979, 44.37, 597.87, 7.12, 0.00, 0.00, 269.45);
- CreateObject(978, 48.55, 583.68, 7.12, 0.00, 0.00, 99.05);
- CreateObject(979, 44.36, 588.62, 7.12, 0.00, 0.00, 269.45);
- CreateObject(978, 44.49, 578.63, 7.12, 0.00, 0.00, 2.52);
- CreateObject(978, 38.80, 592.34, 7.12, 0.00, 0.00, 269.23);
- CreateObject(979, 43.28, 588.52, 7.12, 0.00, 0.00, 103.57);
- CreateObject(978, 39.47, 583.08, 7.12, 0.00, 0.00, 278.09);
- CreateObject(978, 38.85, 601.46, 7.12, 0.00, 0.00, 269.23);
- CreateObject(978, 38.96, 610.70, 7.12, 0.00, 0.00, 269.23);
- CreateObject(979, 42.16, 597.55, 7.12, 0.00, 0.00, 89.80);
- CreateObject(979, 43.08, 612.33, 7.12, 0.00, 0.00, 93.38);
- CreateObject(747, 59.71, 620.72, 6.69, 0.00, 0.00, 0.00);
- CreateObject(747, 64.04, 606.76, 7.01, 0.00, 0.00, 215.00);
- CreateObject(826, 63.72, 619.73, 6.98, 0.00, 0.00, 0.00);
- CreateObject(844, 63.66, 612.89, 8.03, 0.00, 0.00, 341.24);
- CreateObject(760, 67.75, 621.16, 6.81, 0.00, 0.00, 0.00);
- CreateObject(832, 79.29, 601.39, 7.05, 0.00, 0.00, 0.00);
- CreateObject(835, 86.23, 590.15, 7.14, 0.00, 0.00, 0.31);
- CreateObject(839, 88.48, 598.23, 9.63, 0.00, 0.00, 359.48);
- CreateObject(823, 85.96, 595.52, 7.12, 0.00, 0.00, 0.00);
- CreateObject(672, 86.24, 593.87, 10.06, 0.00, 0.00, 0.00);
- CreateObject(669, 64.83, 592.69, 7.29, 0.00, 0.00, 0.00);
- CreateObject(831, 78.55, 598.02, 7.05, 0.00, 0.00, 336.00);
- CreateObject(833, 80.90, 596.09, 7.65, 0.00, 0.00, 230.37);
- CreateObject(822, 76.80, 589.16, 7.09, 0.00, 0.00, 0.00);
- CreateObject(824, 70.03, 592.84, 7.06, 0.00, 0.00, 0.00);
- CreateObject(812, 64.99, 592.19, 8.59, 0.00, 0.00, 0.00);
- CreateObject(824, 59.83, 590.61, 7.06, 0.00, 0.00, 0.00);
- CreateObject(966, 39.14, 615.47, 6.73, 0.00, 0.00, 299.81);
- CreateObject(8838, 36.97, 593.46, 15.49, 0.00, 0.00, 90.00);
- CreateObject(8838, 36.97, 593.46, 18.32, 0.00, 0.00, 90.00);
- CreateObject(3850, 39.16, 579.36, 17.56, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.18, 582.86, 17.58, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.19, 586.36, 17.56, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.20, 589.78, 17.55, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.21, 593.19, 17.54, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.22, 596.67, 17.53, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.23, 600.14, 17.52, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.23, 603.54, 17.53, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.15, 579.36, 14.70, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.17, 582.86, 14.68, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.18, 586.36, 14.66, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.19, 589.78, 14.69, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.20, 593.19, 14.67, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.21, 596.67, 14.70, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.22, 600.14, 14.68, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.22, 603.54, 14.71, 0.00, 0.00, 0.00);
- CreateObject(970, 34.98, 607.61, 14.68, 0.00, 0.00, 90.00);
- CreateObject(970, 34.98, 599.40, 14.71, 0.00, 0.00, 90.00);
- CreateObject(970, 34.98, 595.30, 14.69, 0.00, 0.00, 90.00);
- CreateObject(970, 34.98, 591.21, 14.72, 0.00, 0.00, 90.00);
- CreateObject(970, 34.98, 587.11, 14.65, 0.00, 0.00, 90.00);
- CreateObject(970, 34.98, 583.02, 14.82, 0.00, 0.00, 90.00);
- CreateObject(970, 34.98, 579.29, 14.81, 0.00, 0.00, 90.00);
- CreateObject(970, 35.00, 607.60, 17.57, 0.00, 0.00, 90.00);
- CreateObject(970, 35.00, 599.39, 17.58, 0.00, 0.00, 90.00);
- CreateObject(970, 35.00, 595.29, 17.59, 0.00, 0.00, 90.00);
- CreateObject(970, 35.00, 591.20, 17.60, -0.05, 0.00, 90.00);
- CreateObject(970, 35.00, 587.10, 17.61, 0.00, 0.00, 90.00);
- CreateObject(970, 35.00, 583.01, 17.63, 0.00, 0.00, 90.00);
- CreateObject(970, 35.00, 579.28, 17.64, 0.00, 0.00, 90.00);
- CreateObject(3850, 39.22, 606.94, 14.71, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.23, 606.94, 17.53, 0.00, 0.00, 0.00);
- CreateObject(984, 34.21, 605.73, 13.36, 90.00, 0.00, 0.00);
- CreateObject(984, 34.21, 601.53, 13.36, 90.00, 180.00, 0.00);
- CreateObject(7665, 62.77, 600.51, 5.40, 0.00, 180.00, 0.00);
- CreateObject(7665, 62.77, 600.51, 5.54, 180.00, 0.00, 0.00);
- CreateObject(970, 37.09, 577.48, 17.64, 0.00, 0.00, 0.00);
- CreateObject(970, 37.09, 577.48, 14.72, 0.00, 0.00, 0.00);
- CreateObject(3850, 39.16, 575.95, 11.78, 0.00, 0.00, 0.00);
- CreateObject(970, 37.14, 608.61, 17.57, 0.00, 0.00, 0.00);
- CreateObject(970, 37.14, 608.61, 14.84, 0.00, 0.00, 0.00);
- //gate = CreateObject(968, 39.12, 615.55, 7.53, 0.00, 90.00, 120.11);
- elevator = CreateObject(18755, 32.2979, 603.80, 18.75, 0.00, 0.00, 180.00);
- door3 = CreateObject(970, 35.00, 607.59, 17.52, 0.00, 0.00, 90.00);
- door2 = CreateObject(970, 34.99, 603.55, 14.68, 0.00, 0.00, 90.00);
- door1 = CreateObject(970, 34.99, 603.49, 11.78, 0.00, 0.00, 90.00);
- //go[0] = CreateObject(968, 41.92, 624.17, 6.77, 0.00, 90.00, 269.00);
- //go[1] = CreateObject(968, 40.08, 624.18, 6.70, 0.00, 90.00, 269.00);
- //go[2] = CreateObject(968, 34.79, 621.42, 6.64, 0.00, 90.00, 0.00);
- //go[3] = CreateObject(968, 34.79, 620.02, 6.65, 0.00, 89.50, 0.00);
- //go[4] = CreateObject(968, 34.78, 618.61, 6.64, 0.00, 88.91, 0.00);
- //go[5] = CreateObject(968, 34.77, 617.17, 6.65, 0.00, 88.50, 0.00);
- CreateObject(968, 34.79, 621.42, 6.64, 0.00, 90.00, 0.00);
- CreateObject(968, 34.79, 620.02, 6.65, 0.00, 89.50, 0.00);
- CreateObject(968, 34.78, 618.61, 6.64, 0.00, 88.91, 0.00);
- CreateObject(968, 34.77, 617.17, 6.65, 0.00, 88.50, 0.00);
- //status
- ElevatorStatus = 3;
- for(new i; i<MAX_PLAYERS; i++)
- {
- SetPVarInt(i, "OnRC", -1);
- }
- //timer
- SetTimer("MoveToSecondDown", 10000, 0);
- //Labels
- first = Create3DTextLabel("", COLOR_BLUE, 35.1825, 603.6802, 17.8232+1.5, 3, 0, 0);
- second = Create3DTextLabel("", COLOR_BLUE, 35.1825, 603.6802, 14.6732+1.5, 3, 0, 0);
- third = Create3DTextLabel("", COLOR_BLUE, 35.1825, 603.6802, 11.8382+1.5, 3, 0, 0);
- flyingtext[3] = Create3DTextLabel("Use (/tryrc) to play the RC car", 0xFF0000AA, 39.3410, 619.4432, 7.4325+0.2, 10, 0, 0);
- flyingtext[2] = Create3DTextLabel("Third Floor", 0xFF0000AA, 35.1825, 603.6802, 17.8232, 4, 0, 0);
- flyingtext[1] = Create3DTextLabel("Second Floor", 0xFF0000AA, 35.1825, 603.6802, 14.6732, 4, 0, 0);
- flyingtext[0] = Create3DTextLabel("First Floor", 0xFF0000AA, 35.1825, 603.6802, 11.8382, 4, 0, 0);
- info = CreatePickup(1239, 23, 39.3410, 619.4432, 7.4325-0.3, -1);
- //end of OnFilterScriptInIt
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SetPVarInt(playerid, "OnRC", -1);
- return 1;
- }
- public OnPlayerDisconnect(playerid)
- {
- new x = GetPVarInt(playerid, "OnRC");
- DestroyVehicle(rcid[x]);
- SetPVarInt(playerid, "OnRC", -1);
- SetPVarInt(playerid, "phase1", 1);
- SetPVarInt(playerid, "phase2", 0);
- SetPVarInt(playerid, "phase3", 0);
- SetPVarInt(playerid, "phase4", 0);
- SetPVarInt(playerid, "phase5", 0);
- return 1;
- }
- public OnFilterScriptExit()
- {
- new params[32];
- for(new i; i < MAX_OBJECTS; i++)
- {
- DestroyObject(i);
- }
- for(new i=0; i < 4; i++)
- {
- Delete3DTextLabel(flyingtext[i]);
- }
- for(new i; i < MAX_RC; i++)
- {
- DestroyVehicle(rcid[i]);
- }
- Delete3DTextLabel(first);
- Delete3DTextLabel(second);
- Delete3DTextLabel(third);
- DestroyPickup(info);
- for(new i; i<MAX_PLAYERS; i++)
- {
- return cmd_exitrc(i, params);
- }
- return 1;
- }
- forward TheTime(playerid);
- public TheTime(playerid)
- {
- rmilsec += 1;
- if(rmilsec == 100)
- {
- rsec += 1;
- rmilsec = 0;
- }
- if(rsec == 59)
- {
- rmin += 1;
- rsec = 0;
- }
- return 1;
- }
- forward MoveToThird();
- public MoveToThird()
- {
- new string[128];
- MoveObject(elevator, 32.2979, 603.5980, 18.8486, 3);
- MoveObject(door2, 34.99, 603.55, 14.68, 3);
- ElevatorStatus = 3;
- format(string, sizeof(string), "The Elevator is now moving to the Third Floor");
- Update3DTextLabelText(first, COLOR_BLUE, string);
- Update3DTextLabelText(second, COLOR_BLUE, string);
- Update3DTextLabelText(third, COLOR_BLUE, string);
- return 1;
- }
- forward MoveToSecondDown();
- public MoveToSecondDown()
- {
- new string[128];
- MoveObject(elevator, 32.2979, 603.5980, 16.1376, 3);
- MoveObject(door3, 34.99, 603.55, 17.52, 3);
- ElevatorStatus = 2;
- format(string, sizeof(string), "The Elevator is now moving the Second Floor");
- Update3DTextLabelText(first, COLOR_BLUE, string);
- Update3DTextLabelText(second, COLOR_BLUE, string);
- Update3DTextLabelText(third, COLOR_BLUE, string);
- return 1;
- }
- forward MoveToFirst();
- public MoveToFirst()
- {
- new string[128];
- MoveObject(elevator, 32.2979, 603.5980, 12.9356, 3);
- MoveObject(door2, 34.99, 603.55, 14.68, 3);
- ElevatorStatus = 1;
- format(string, sizeof(string), "The Elevator is now moving to the First Floor");
- Update3DTextLabelText(first, COLOR_BLUE, string);
- Update3DTextLabelText(second, COLOR_BLUE, string);
- Update3DTextLabelText(third, COLOR_BLUE, string);
- return 1;
- }
- forward MoveToSecondUp();
- public MoveToSecondUp()
- {
- new string[128];
- MoveObject(elevator, 32.2979, 603.5980, 16.1356, 3);
- MoveObject(door1, 34.99, 603.55, 11.78, 3);
- ElevatorStatus = 4;
- format(string, sizeof(string), "The Elevator is now at the Second Floor");
- Update3DTextLabelText(first, COLOR_BLUE, string);
- Update3DTextLabelText(second, COLOR_BLUE, string);
- Update3DTextLabelText(third, COLOR_BLUE, string);
- return 1;
- }
- CMD:tryrc(playerid, params[])
- {
- if(!IsPlayerInRangeOfPoint(playerid, 5.0, 39.3410, 619.4432, 7.4325))
- {
- SendClientMessage(playerid, COLOR_GREY, "You have to be in the RC Circuit to drive a RC");
- return 1;
- }
- if(GetPVarInt(playerid, "OnRC") != -1)
- {
- SendClientMessage(playerid, 0xff0000ff, "You already drive a RC");
- return 1;
- }
- for(new x; x<MAX_RC+1; x++)
- {
- if(RCUsed[x] == 0 && x < MAX_RC)
- {
- new string[64];
- new engine, lights, alarm, doors, boonet, boot, objective;
- new i = random(3);
- {
- rcid[x] = CreateVehicle(441, SpawnPos[i][0], SpawnPos[i][1], SpawnPos[i][2], -90.0000, -1, -1, 7200);
- }
- GetVehicleParamsEx(rcid[x], engine, lights, alarm, doors, boonet, boot, objective);
- SetVehicleParamsEx(rcid[x], 1, lights, alarm, doors, boonet, boot, objective);
- SetPlayerPos(playerid, 40.4026, 621.7995, -107.4325);
- PutPlayerInVehicle(playerid, rcid[x], 0);
- SetPVarInt(playerid, "OnRC", x);
- gotime = SetTimerEx("ReadyToGo", 1000, 1, "i", playerid);
- SetPVarInt(playerid, "phase1", 1);
- SetPVarInt(playerid, "phase2", 0);
- SetPVarInt(playerid, "phase3", 0);
- SetPVarInt(playerid, "phase4", 0);
- SetPVarInt(playerid, "phase5", 0);
- TogglePlayerControllable(playerid, 0);
- RCUsed[x] = 1;
- format(string, sizeof(string), "You're on RC number %d", x);//debug
- SendClientMessage(playerid, COLOR_YELLOW, string);//debug
- break;
- }
- if(x == MAX_RC)
- {
- SendClientMessage(playerid, COLOR_GREY, "All RC is being used");
- return 1;
- }
- }
- return 1;
- }
- forward ReadyToGo(playerid);
- public ReadyToGo(playerid)
- {
- if(GetPVarInt(playerid, "phase1") == 1)
- {
- SendClientMessage(playerid,COLOR_PURPLE, "Get Ready!");
- SetPVarInt(playerid, "phase1", 0);
- SetPVarInt(playerid, "phase2", 1);
- }
- else if(GetPVarInt(playerid, "phase2") == 1)
- {
- SendClientMessage(playerid,COLOR_PINK, "3!");
- SetPVarInt(playerid, "phase2", 0);
- SetPVarInt(playerid, "phase3", 1);
- }
- else if(GetPVarInt(playerid, "phase3") == 1)
- {
- SendClientMessage(playerid,COLOR_PINK, "2!");
- SetPVarInt(playerid, "phase3", 0);
- SetPVarInt(playerid, "phase4", 1);
- }
- else if(GetPVarInt(playerid, "phase4") == 1)
- {
- SendClientMessage(playerid,COLOR_PINK, "1!");
- SetPVarInt(playerid, "phase4", 0);
- SetPVarInt(playerid, "phase5", 1);
- }
- else if(GetPVarInt(playerid, "phase5") == 1)
- {
- SendClientMessage(playerid, COLOR_BLUE, "GO!");
- TogglePlayerControllable(playerid, 1);
- SetPVarInt(playerid, "phase5", 0);
- racetime = SetTimerEx("TheTime", 10, 1, "i", playerid);
- KillTimer(gotime);
- SetPlayerCheckpoint(playerid, 84.77, 600.98, 8.15, 3);
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(GetPVarInt(playerid, "OnRC") != -1)
- {
- DisablePlayerCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 2, 41.09, 614.48, 7.66, 41.09, 614.48, 7.66, 2.5);
- }
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- if(GetPVarInt(playerid, "OnRC") != -1)
- {
- new string[128], name[32];
- new Float:health;
- DisablePlayerRaceCheckpoint(playerid);
- GetVehicleHealth(GetPlayerVehicleID(playerid), health);
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "%s's time is %d minutes and %d.%d seconds, with %.2f vehicle damage", name, rmin, rsec, rmilsec, 1000-health);
- for(new i; i<MAX_PLAYERS; i++)
- if(IsPlayerInRangeOfPoint(i, 35, 67.50, 602.01, 8.03))
- {
- SendClientMessage(i, COLOR_YELLOW, string);
- }
- KillTimer(racetime);
- rsec = 0;
- rmilsec = 0;
- rmin = 0;
- RemovePlayerFromVehicle(playerid);
- SetPlayerPos(playerid, 39.3410, 619.4432, 7.4325);
- new x = GetPVarInt(playerid, "OnRC");
- DestroyVehicle(rcid[x]);
- RCUsed[x] = 0;
- SetPVarInt(playerid, "OnRC", -1);
- }
- return 1;
- }
- CMD:exitrc(playerid, params[])
- {
- if(GetPVarInt(playerid, "OnRC") != -1)
- {
- new string[128], name[32];
- DisablePlayerRaceCheckpoint(playerid);
- DisablePlayerCheckpoint(playerid);
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "%s exits the RC Circuit", name);
- for(new i; i<MAX_PLAYERS; i++)
- if(IsPlayerInRangeOfPoint(i, 35, 67.50, 602.01, 8.03))
- {
- SendClientMessage(i, COLOR_YELLOW, string);
- }
- KillTimer(racetime);
- rsec = 0;
- rmilsec = 0;
- rmin = 0;
- RemovePlayerFromVehicle(playerid);
- SetPlayerPos(playerid, 39.3410, 619.4432, 7.4325);
- new x = GetPVarInt(playerid, "OnRC");
- DestroyVehicle(rcid[x]);
- RCUsed[x] = 0;
- SetPVarInt(playerid, "OnRC", -1);
- TogglePlayerControllable(playerid, 1);
- }
- else
- {
- SendClientMessage(playerid, 0xffffffff, "You aren't driving the RC in the RC Circuit!");
- }
- return 1;
- }
- CMD:gotorc(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not allowed to do this command!");
- return 1;
- }
- SetPlayerPos(playerid, 31.48, 575.75, 8.50);
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- if(objectid == elevator)
- {
- if(ElevatorStatus == 1)
- {
- new string[128];
- MoveObject(door1, 34.99, 607.59, 11.78,2);
- SetTimer("MoveToSecondUp", 10000, 0);
- format(string, sizeof(string), "The Elevator is now at the First Floor");
- Update3DTextLabelText(first, COLOR_BLUE, string);
- Update3DTextLabelText(second, COLOR_BLUE, string);
- Update3DTextLabelText(third, COLOR_BLUE, string);
- return 1;
- }
- else if(ElevatorStatus == 2)
- {
- new string[128];
- MoveObject(door2, 34.99, 607.59, 14.68,2);
- SetTimer("MoveToFirst", 10000, 0);
- format(string, sizeof(string), "The Elevator is now at the Second Floor");
- Update3DTextLabelText(first, COLOR_BLUE, string);
- Update3DTextLabelText(second, COLOR_BLUE, string);
- Update3DTextLabelText(third, COLOR_BLUE, string);
- return 1;
- }
- else if(ElevatorStatus == 3)
- {
- new string[128];
- MoveObject(door3, 34.99, 607.59, 17.56, 2);
- SetTimer("MoveToSecondDown", 10000, 0);
- format(string, sizeof(string), "The Elevator is now at the Third Floor");
- Update3DTextLabelText(first, COLOR_BLUE, string);
- Update3DTextLabelText(second, COLOR_BLUE, string);
- Update3DTextLabelText(third, COLOR_BLUE, string);
- return 1;
- }
- else if(ElevatorStatus == 4)
- {
- new string[128];
- MoveObject(door2, 34.99, 607.59, 14.68,2);
- SetTimer("MoveToThird", 10000, 0);
- format(string, sizeof(string), "The Elevator is now at the Second Floor");
- Update3DTextLabelText(first, COLOR_BLUE, string);
- Update3DTextLabelText(second, COLOR_BLUE, string);
- Update3DTextLabelText(third, COLOR_BLUE, string);
- return 1;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement