Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //At the top of script
- #define NUMBER_OF_TEAMS 5
- new Text:ClassSection[NUMBER_OF_TEAMS];
- new TeamName[][] =
- {
- { "Team one" },
- { "Team two" },
- { "Team three" },
- { "Team four" },
- { "Team five" }
- };
- //OnGameModeInit
- //Class Section
- new
- team_name[24]
- ;
- for( new i ; i < NUMBER_OF_TEAMS; i++ )
- {
- ClassSection[i] = TextDrawCreate(000.000000,000.000000,TeamName[i]);//The position is correct i just made it 000 :P
- TextDrawAlignment(ClassSection[i],0);
- TextDrawBackgroundColor(ClassSection[0],color);
- TextDrawFont(ClassSection[i],3);
- TextDrawLetterSize(ClassSection[i],0.399999,1.600000);
- TextDrawColor(ClassSection[i], clolr);
- TextDrawSetOutline(ClassSection[i],1);
- TextDrawSetProportional(ClassSection[i],1);
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- for( new i ; i < NUMBER_OF_TEAMS; i++ )
- {
- TextDrawHideForPlayer(playerid,ClassSection[i]);
- }
- switch (classid)
- {
- case 0..3:
- {
- TextDrawShowForPlayer(playerid,ClassSelection[0];
- }
- case 4..7:
- {
- TextDrawShowForPlayer(playerid,ClassSelection[1];
- }
- case 8..10:
- {
- TextDrawShowForPlayer(playerid,ClassSelection[2];
- }
- case 11..14:
- {
- TextDrawShowForPlayer(playerid,ClassSelection[3];
- }
- case 15..21:
- {
- TextDrawShowForPlayer(playerid,ClassSelection[4];
- }
- }
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- for( new i; i < NUMBER_OF_TEAMS; i++ )
- {
- TextDrawHideForPlayer(playerid, ClassSection[i]);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement