Advertisement
Guest User

SAP Sidhu

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