Guest User

Untitled

a guest
Dec 6th, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. case DIALOG_SWITCH_TEAM:
  2. {
  3. if ( !response )
  4. return false;
  5.  
  6. new switch_str[ 128 ];
  7.  
  8. switch ( listitem )
  9. {
  10. case 0..2:
  11. {
  12. playerData[ playerid ][ P_TEAM ] = listitem;
  13. playerData[ playerid ][ P_SUB ] = false;
  14.  
  15. SetPlayerColor( playerid, teamColor( listitem, 0 ) );
  16.  
  17. syncPlayer( playerid );
  18.  
  19. #if GM_LANGUAGE == 0
  20. format( switch_str, sizeof( switch_str ), " *** \"%s\" trocou para a equipe \"%s\".", playerName( playerid ), teamName( listitem ) );
  21. #else
  22. format( switch_str, sizeof( switch_str ), "» %s has switched to team %s.", playerName( playerid ), teamName( listitem ) );
  23. #endif
  24.  
  25. SendClientMessageToAll( teamColor( listitem, 1 ), switch_str );
  26. }
  27. case 3..4:
  28. {
  29. playerData[ playerid ][ P_TEAM ] = listitem - 3;
  30. playerData[ playerid ][ P_SUB ] = true;
  31.  
  32. SetPlayerColor( playerid, SUB_COLOR );
  33.  
  34. syncPlayer( playerid );
  35.  
  36. #if GM_LANGUAGE == 0
  37. format( switch_str, sizeof( switch_str ), " *** \"%s\" trocou para a equipe \"%s\" (SUB).", playerName( playerid ), teamName( listitem - 3 ) );
  38. #else
  39. format( switch_str, sizeof( switch_str ), "» %s has switched to team sub (%s)", playerName( playerid ), teamName( listitem - 3 ) );
  40. #endif
  41.  
  42. SendClientMessageToAll( teamColor( listitem - 3, 0 ), switch_str );
  43. }
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment