hlmod.hu
https://hlmod.hu/

Csere
https://hlmod.hu/viewtopic.php?f=29&t=8294
Oldal: 1 / 1

Szerző:  Show1337 [ 2013.04.28. 20:22 ]
Hozzászólás témája:  Csere

Tiszteletem!

Valaki megtudná írni azt a plugint hogy, ha a CT csapat győz akkor megcserélje a csapatokat ? Tehát CT-ből T lesz , T-ből CT.

Előre is Kösz.

Szerző:  tomy3231 [ 2013.04.28. 20:23 ]
Hozzászólás témája:  Re: Csere

http://amxmodx.crys.hu/site/?p=pluginz&c=l&f=DSL

Szerző:  JoGoBeLLa [ 2013.04.28. 20:57 ]
Hozzászólás témája:  Re: Csere

tomy3231 írta:
http://amxmodx.crys.hu/site/?p=pluginz&c=l&f=DSL

Nem ezt kérte....
Ez egy "x" kör után cserél.
Neki olyan kéne, hogy ha a ctk győznek akkor... nem körre.

Szerző:  tomy3231 [ 2013.04.28. 21:26 ]
Hozzászólás témája:  Re: Csere

SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <cstrike>
  6.  
  7. new roundcounter, swap_teams_round;
  8.  
  9. public plugin_init()
  10. {
  11. register_plugin("Plugin Name","Version","Author")
  12. register_dictionary("swapteams.txt")
  13. swap_teams_round = register_cvar("swap_teams_round","1");
  14. register_event("SendAudio", "ctwin", "a", "2=%!MRAD_ctwin")
  15. }
  16.  
  17. public ctwin()
  18. {
  19. roundcounter++;
  20. if (roundcounter >= get_pcvar_num(swap_teams_round)) {
  21. set_task(2.0,"korvege");
  22. roundcounter = 0;
  23. }
  24. }
  25.  
  26. public korvege()
  27. {
  28. client_print(0,print_chat,"%L",0,"SWAP_1");
  29. set_task(1.0,"Event_Round_End");
  30. }
  31.  
  32. public Event_Round_End(){
  33. set_cvar_num("mp_limitteams", 0)
  34. new CsTeams:team
  35. new Players[32]
  36. new playerCount, i, player
  37. get_players(Players, playerCount, "h")
  38. for (i=0; i<playerCount; i++) {
  39. player = Players[i]
  40.  
  41. team=cs_get_user_team(player)
  42. if(team==CS_TEAM_CT)cs_set_user_team(player, CS_TEAM_T)
  43. else if(team==CS_TEAM_T)cs_set_user_team(player, CS_TEAM_CT)
  44. cs_reset_user_model(player)
  45. }
  46. set_cvar_num("mp_limitteams", 1)
  47. set_task(6.0,"rezetmodelsz");
  48. }
  49.  
  50. public rezetmodelsz() {
  51. new Players[32]
  52. new playerCount, i, player
  53. get_players(Players, playerCount, "h")
  54. for (i=0; i<playerCount; i++) {
  55. player = Players[i]
  56. cs_reset_user_model(player)
  57. }
  58.  
  59. }

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/