Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.52 KB | None | 0 0
  1. //At the top of script
  2. #define NUMBER_OF_TEAMS    5
  3.  
  4. new Text:ClassSection[NUMBER_OF_TEAMS];
  5. new TeamName[][] =
  6. {
  7.     { "Team one" },
  8.     { "Team two" },
  9.     { "Team three" },
  10.     { "Team four" },
  11.     { "Team five" }
  12. };
  13.  
  14. //OnGameModeInit
  15.  
  16.     //Class Section
  17.     new
  18.         team_name[24]
  19.     ;
  20.     for( new i ; i < NUMBER_OF_TEAMS; i++ )
  21.     {
  22.         ClassSection[i] = TextDrawCreate(000.000000,000.000000,TeamName[i]);//The position is correct i just made it 000 :P
  23.         TextDrawAlignment(ClassSection[i],0);
  24.         TextDrawBackgroundColor(ClassSection[0],color);
  25.         TextDrawFont(ClassSection[i],3);
  26.         TextDrawLetterSize(ClassSection[i],0.399999,1.600000);
  27.         TextDrawColor(ClassSection[i], clolr);
  28.         TextDrawSetOutline(ClassSection[i],1);
  29.         TextDrawSetProportional(ClassSection[i],1);
  30.     }
  31.  
  32. public OnPlayerRequestClass(playerid, classid)
  33. {
  34.     for( new i ; i < NUMBER_OF_TEAMS; i++ )
  35.     {
  36.         TextDrawHideForPlayer(playerid,ClassSection[i]);
  37.     }
  38.  
  39.     switch (classid)
  40.     {
  41.         case 0..3:  
  42.         {
  43.             TextDrawShowForPlayer(playerid,ClassSelection[0];
  44.         }
  45.         case 4..7:  
  46.         {
  47.             TextDrawShowForPlayer(playerid,ClassSelection[1];
  48.         }
  49.         case 8..10:
  50.         {
  51.             TextDrawShowForPlayer(playerid,ClassSelection[2];
  52.         }
  53.         case 11..14:
  54.         {
  55.             TextDrawShowForPlayer(playerid,ClassSelection[3];
  56.         }
  57.         case 15..21:
  58.         {
  59.             TextDrawShowForPlayer(playerid,ClassSelection[4];
  60.         }
  61.     }
  62.     return 1;
  63. }
  64.  
  65. public OnPlayerRequestSpawn(playerid)
  66. {
  67.     for( new i; i < NUMBER_OF_TEAMS; i++ )
  68.     {
  69.         TextDrawHideForPlayer(playerid,  ClassSection[i]);
  70.     }
  71.     return 1;
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement