hlmod.hu
https://hlmod.hu/

Csapat csere nyeréskor
https://hlmod.hu/viewtopic.php?f=29&t=17609
Oldal: 1 / 1

Szerző:  MISU1998 [ 2014.10.18. 13:36 ]
Hozzászólás témája:  Csapat csere nyeréskor

Sziasztok, nekem egy olyan plugin kéne, hogy ha a ct csapat nyer akkor megcseréli a csapatokat.
DE, ha a terrorok nyernek, akkor ne legyen csapatcsere :)

Köszönöm

Szerző:  DeR0iD [ 2014.10.18. 14:48 ]
Hozzászólás témája:  Re: Csapat csere nyeréskor

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <cstrike>
  3.  
  4. #define PLUGIN "New Plug-In"
  5. #define VERSION "1.0"
  6. #define AUTHOR "DeRoiD"
  7.  
  8.  
  9. public plugin_init() {
  10. register_plugin(PLUGIN, VERSION, AUTHOR)
  11. register_event("SendAudio", "csapatcsere", "a", "2&%!MRAD_ctwin")
  12. }
  13. public csapatcsere()
  14. {
  15. new players[32], num, id
  16. get_players(players, num, "c")
  17.  
  18. for(new i; i < num; i++)
  19. {
  20. if(cs_get_user_team(id) == CS_TEAM_CT)
  21. cs_set_user_team(id, CS_TEAM_T)
  22. else if(cs_get_user_team(id) == CS_TEAM_T)
  23. cs_set_user_team(id, CS_TEAM_CT)
  24. }
  25. }

Szerző:  MISU1998 [ 2014.10.18. 16:31 ]
Hozzászólás témája:  Re: Csapat csere nyeréskor

Nem jó :(

L 10/18/2014 - 16:29:33: [CSTRIKE] Player out of range (0)
L 10/18/2014 - 16:29:33: [AMXX] Displaying debug trace (plugin "csapatcsere.amxx")
L 10/18/2014 - 16:29:33: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 10/18/2014 - 16:29:33: [AMXX] [0] csapatcsere.sma::csapatcsere (line 20)

/Log

Szerző:  IrOn [ 2014.10.18. 17:04 ]
Hozzászólás témája:  Re: Csapat csere nyeréskor

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <cstrike>
  3.  
  4. #define PLUGIN "New Plug-In"
  5. #define VERSION "1.0"
  6. #define AUTHOR "DeRoiD"
  7.  
  8.  
  9. public plugin_init() {
  10. register_plugin(PLUGIN, VERSION, AUTHOR)
  11. register_event("SendAudio", "csapatcsere", "a", "2&%!MRAD_ctwin")
  12. }
  13. public csapatcsere()
  14. {
  15. new players[32], num, id
  16. get_players(players, num, "c")
  17.  
  18. for(new i=0; i < num; i++)
  19. {
  20. id = players[i];
  21. new CsTeams:t = cs_get_user_team(id)
  22. if(t == CS_TEAM_CT)
  23. cs_set_user_team(id, CS_TEAM_T)
  24. else if(t == CS_TEAM_T)
  25. cs_set_user_team(id, CS_TEAM_CT)
  26. }
  27. }

Szerző:  lili [ 2014.10.18. 17:13 ]
Hozzászólás témája:  Re: Csapat csere nyeréskor

Ez nekem is fog kelleni :D Valaki a kérésemet nem csinálná meg?

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