Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.25 KB | None | 0 0
  1. /*
  2.   @@@@@@@@ @@@  @@@ @@@@@@@@       @@@@@@@   @@@@@@  @@@@@@@@@@  @@@ @@@  @@@  @@@@@@@
  3.   @@!      @@!  !@@ @@!           !@@       @@!  @@@ @@! @@! @@! @@! @@!@!@@@ !@@
  4.   @!!!:!    !@@!@!  @!!!:!        !@! @!@!@ @!@!@!@! @!! !!@ @!@ !!@ @!@@!!@! !@! @!@!@
  5.   !!:       !: :!!  !!:           :!!   !!: !!:  !!! !!:     !!: !!: !!:  !!! :!!   !!:
  6.   : :: ::: :::  ::: : :: :::       :: :: :   :   : :  :      :   :   ::    :   :: :: :
  7.                               This version was made by Zezam
  8. */
  9. //------ Includes ------
  10. #include <a_samp>
  11. #include <Zdini>
  12. #include <core>
  13. #include <float>
  14.  
  15. //------ Color-Defines ------
  16. #define COLOR_COPS   0x33CCFFAA
  17. #define COLOR_GANGS     0x33AA33AA
  18. #define COLOR_GLOBALMSG 0xFF8000FF
  19. #define COLOR_YELLOW  0xFFFF00AA
  20. #define COLOR_JOIN   0x99FF9900
  21. #define COLOR_RED       0xD43B0300
  22. #define COLOR_GREEN  0x21DD00FF
  23. #define COLOR_LIGHTRED  0xFF6600FF
  24. #define COLOR_PINK      0xE6006600
  25. #define COLOR_WHITE  0xFFFFFFFF
  26. #define COLOR_BLACK  0x000000AA
  27. #define COLOR_GOLD   0xE3B515AA
  28.  
  29. //------ Gang Defines ------
  30. #define COP 1
  31. #define CRIMINAL 2
  32.  
  33. //------ Zee Admin Defines ------
  34. /*(Uhm, I can add this admin system later if thats wished, not Great, but works.)*/
  35. //------ Other Defines ------
  36. #define MAP_NAME "San Andreas"
  37. #define SERVER_NAME    "Nitroz's OS Gamemode project v.0.2"
  38. #define GAMEMODE "Cops n' Robbers / DM? IDK"
  39.  
  40. //------ Spawning and setting teams ------
  41.  
  42. public OnPlayerSpawn(playerid)
  43. {
  44.   if(IsPlayerNPC(playerid)) return 1;
  45.  
  46.   SetPlayerInterior(playerid,0);
  47.      if (GetPlayerSkin(playerid) >= 105 && GetPlayerSkin(playerid) <= 107) //Grove in this case...
  48.   {
  49.      SetPlayerTeam(playerid, CRIMINAL);
  50.   SetPlayerColor(playerid, COLOR_GANGS);
  51.      SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
  52.   }
  53.   else
  54.   {
  55.   SetPlayerTeam(playerid, COP);//Since I've only thought of adding just a few skins... I CAN do it this way. Not the best but still.
  56.   SetPlayerColor(playerid, COLOR_COPS);
  57.      SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
  58.      return 1;
  59. }
  60.  
  61. //------ Commands ------
  62. public OnPlayerCommandText(playerid, cmdtext[]){
  63.      dcmd(help, 4, cmdtext);
  64.   dcmd(o, 1, cmdtext);
  65.   return 0;}
  66.  
  67. dcmd_help(playerid,params[]){
  68.    #pragma unused params
  69.    SendClientMessage(playerid, COLOR_WHITE, "This is the Help section");
  70.    return 1;}
  71.    
  72. dcmd_o(playerid,params[]){ //Don't remember if I ever made this work a 100% on GTAPB, but um...
  73.      GetPlayerName(playerid,name,sizeof(name));
  74.   format(str, sizeof(str), "[OOC]%s : %s  \r\n", name, params[1]), SendClientMessageToAll(COLOR_YELLOW, str);
  75.    return 1;}
  76.  
  77. public OnGameModeInit()
  78. {
  79.     printf("    Nitroz Gamemode Project   ");
  80.         printf("This version was made by Zezam");
  81.     RandomMessages = true;
  82.     rmessages = SetTimer("Messages", 600000, true);
  83.         return 1;
  84. }
  85.  
  86. public OnGameModeExit()
  87. {
  88.     KillTimer(rmessages);
  89.         printf("GameMode ended");
  90.     return 1;
  91. }
  92.  
  93. public Messages()
  94. {
  95.     if(RandomMessages == true)
  96.     {
  97.         new string[128];
  98.         new mess = random(sizeof(PMessages));
  99.         format(string, sizeof(string), "[Server Message]: %s", PMessages[mess]);
  100.         SendClientMessageToAll(COLOR_WHITE, string);
  101.     }
  102.     return 1;
  103. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement