Advertisement
eyal282

Untitled

Feb 27th, 2013
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1.  
  2. public TeamCmd(id)
  3. {
  4. static teams[64]
  5.  
  6. formatex(teams, charsmax(teams),"\r[\y BeatTheB-Jail\r ]\w Choose Your Teams")
  7. new iMenu = menu_create(teams, "sub_teamcmd")
  8.  
  9. new players[32], pnum, tempid
  10. new szName[32], szTempid[10]
  11.  
  12. get_players(players, pnum, "a")
  13.  
  14. for( new i; i<pnum; i++ )
  15. {
  16. tempid = players[i]
  17.  
  18. if(cs_get_user_team(tempid) != CS_TEAM_T)
  19. continue
  20.  
  21. get_user_name(tempid, szName, 31)
  22. num_to_str(tempid, szTempid, 9)
  23. menu_additem(iMenu, szName, szTempid, 0)
  24. menu_additem(iMenu, "Auto Split", "1")
  25. formatex(teams, charsmax(teams),"Team Color [ %s ]", TeamColor)
  26. menu_additem(iMenu, teams, "2")
  27. }
  28. menu_display(id, iMenu)
  29. return PLUGIN_HANDLED
  30. }
  31. }
  32.  
  33. public sub_teamcmd(id, menu, item)
  34. {
  35. new Data[6], Name[64]
  36. new Access, Callback
  37. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
  38.  
  39. new tempid = str_to_num(Data)
  40. get_user_name(tempid, challenged, 31)
  41. new key = str_to_num(item)
  42. switch(key)
  43. {
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement