Advertisement
MadMakz

wintext.sp

Sep 22nd, 2011
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. #include <sourcemod>
  2.  
  3. #define TEAM_T 2
  4. #define TEAM_CT 3
  5.  
  6. #define ct_team "Counter-Terroristen"
  7. #define t_team "Terroristen"
  8.  
  9. public OnPluginStart()
  10. {
  11.     HookEvent("round_end", OnRoundEnd);
  12. }
  13.  
  14. public OnRoundEnd(Handle:event)
  15. {  
  16.     new winner = GetEventInt(event, "winner");
  17.     CreateTimer(0.1, PrintMsg, winner);
  18.     CreateTimer(3.0, PrintMsg, winner);
  19. }
  20.  
  21. public PrintMsg(Handle:timer, winner)
  22. {
  23.     new String:winningTeam[32];
  24.    
  25.     if (winner == TEAM_T){ winningTeam = t_team; }
  26.     if (winner == TEAM_CT){ winningTeam = ct_team; }
  27.    
  28.     if(winner == TEAM_T || winner == TEAM_CT)
  29.     {
  30.         PrintCenterTextAll("%s haben gewonnen!", winningTeam);
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement