Advertisement
Guest User

SAP Sidhu

a guest
Mar 11th, 2008
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.33 KB | None | 0 0
  1. /*
  2. Credits goes to:
  3. [SAP]Sidhu, for his awesome idea and programming!
  4. [SAP]Sidhu Made this
  5.     DO NOT REMOVE THE STUFF ABOVE, ANY ATTEMP TO DO SO WILL RESULT IN YOU PAYING THE CONSEQUENCES IF CAUGHT
  6. */
  7. //===============================Include Files==================================
  8.  
  9.  
  10. #include <a_samp>
  11. #define GREY 0xc8bebeAA
  12. #define COLOR_GREY 0xc8bebeAA
  13. #define COLOR_LIME 0x99FF00AA
  14. #define COLOR_RED 0xAA3333AA
  15. #define COLOR_ORANGE 0xFF9900AA
  16. #define COLOR_GRAD1 0xB4B5B7AA
  17. #define COLOR_RED 0xAA3333AA
  18. #define COLOR_LIGHTBLUE 0x33CCFFAA
  19. #define COLOR_GREEN 0x33AA33AA
  20. #define COLOR_WHITE 0xFFFFFFAA
  21. #define COLOR_BLUE 0x0000FFAA
  22. #define COLOR_YELLOW 0xFFFF00AA
  23. #pragma tabsize 0
  24. new gate;
  25. new gate2;
  26.  
  27. // This is a comment
  28. // uncomment the line below if you want to write a filterscript
  29. //#define FILTERSCRIPT
  30.  
  31. #if defined FILTERSCRIPT
  32.  
  33. public OnPlayerConnect(playerid)
  34. {
  35.     SendClientMessage(playerid, COLOR_YELLOW, "This script was made by [SAP]Sidhu!");
  36.     SendClientMessage(playerid, COLOR_YELLOW, "To view the SFPD gate commands, type /sfpdcmds");
  37.     return 1;
  38. }
  39.  
  40. public OnFilterScriptInit()
  41. {
  42.     CreateObject(971, -1571.684082, 661.248901, 9.782433, 0.0000, 0.0000, 91.1003); // Gate 1 - Front (moving)
  43.     CreateObject(971, -1701.645386, 684.088989, 27.385559, 0.0000, 0.0000, 269.0036); // Gate 2 - Back (moving)
  44.     CreateObject(971, -1696.932495, 688.375793, 27.460558, 0.0000, 0.0000, 179.6222); // Secondary gate (does not move)
  45.     CreateObject(971, -1688.062378, 688.283691, 27.435558, 0.0000, 0.0000, 179.6222); // Secondary gate (does not move)
  46.     return 1;
  47. }
  48.  
  49. public OnFilterScriptExit()
  50. {
  51.     return 1;
  52. }
  53.  
  54. #else
  55.  
  56. main()
  57. {
  58.     print("\n----------------------------------");
  59.     print(" Blank Gamemode by your name here");
  60.     print("----------------------------------\n");
  61. }
  62.  
  63. #endif
  64.  
  65. public OnGameModeInit()
  66. {
  67.     // Don't use these lines if it's a filterscript
  68.     gate = CreateObject(971, -1571.684082, 661.248901, 9.782433, 0.0000, 0.0000, 91.1003); // Gate 1 (closed position)
  69.     gate2 = CreateObject(971, -1701.645386, 684.088989, 27.385559, 0.0000, 0.0000, 269.0036); // Gate 2 (closed position)
  70.     return 1;
  71. }
  72.  
  73.  
  74. public OnPlayerRequestClass(playerid, classid)
  75. {
  76.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  77.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  78.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  79.     return 1;
  80. }
  81.  
  82.  
  83. public OnPlayerCommandText(playerid, cmdtext[])
  84. {
  85.     if (strcmp(cmdtext, "/sfpdo", true)==0) // Command (changable)
  86.        {
  87.       MoveObject (gate,-1572.187622, 670.214355, 9.742842,2); // Gate 1 (open position)
  88.       MoveObject (gate2,-1701.508301, 692.963318, 27.385559,2); // Gate 2 (open position)
  89.       SendClientMessage(playerid, COLOR_RED, "SFPD GATES ARE OPEN!");
  90.       return 1;
  91.        }
  92.     if (strcmp(cmdtext, "/sfpdc", true)==0)
  93.        {
  94.    MoveObject (gate,-1571.684082, 661.248901, 9.782433,2); // Gate 2 (close position)
  95.    MoveObject (gate2,-1701.645386, 684.088989, 27.385559,2); // Gate 2 (close position)
  96.    SendClientMessage(playerid, COLOR_GREEN, "SFPD GATES ARE CLOSED!");
  97.    return 1;
  98.        }
  99.     if(!strcmp(cmdtext, "/sfpdcmds", true))
  100.     {
  101.         SendClientMessage(playerid, COLOR_YELLOW, "/sfpdo - Opens the SFPD gates");
  102.         SendClientMessage(playerid, COLOR_YELLOW, "/sfpdc - Closes the SFPD gates");
  103.         return 1;
  104.        }
  105.  
  106.     return 0;
  107. }
  108.    
  109.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement