hlmod.hu
https://hlmod.hu/

Néző kick
https://hlmod.hu/viewtopic.php?f=10&t=23318
Oldal: 1 / 1

Szerző:  gyurc1111 [2015.12.30. 21:18 ]
Hozzászólás témája:  Néző kick

Valaki átírná,hogy csak akkor rúgja ki ,ha eltelt 60mp mióta specbe van.

  1. #include <amxmodx>
  2. #include <cstrike>
  3.  
  4. #define MIN_PLAYERS 9
  5.  
  6. public Round_Time()
  7. {
  8.         new Float:roundtime = get_cvar_float("mp_roundtime") * 60.0
  9.         new rtime = read_data(1)
  10.  
  11.         if ( roundtime == rtime )   {
  12.         new playerCount = get_playersnum()
  13.  
  14.         if (playerCount > MIN_PLAYERS) {
  15.             new Players[32]
  16.             get_players(Players, playerCount)
  17.  
  18.             for (new i = 0; i < playerCount; i++) {
  19.                                if (is_user_connected(Players[i])) {
  20.                                        if (!(get_user_flags(Players[i]) & ADMIN_IMMUNITY)) {
  21.                         if ((cs_get_user_team(Players[i]) == 3)) {
  22.                             new name[32], authid[32]
  23.  
  24.                             get_user_name(Players[i],name,31)
  25.                             get_user_authid(Players[i],authid,31)
  26.  
  27.                             new userid = get_user_userid(Players[i])
  28.                                 server_cmd("kick #%d ^"Hosszu ideig nezo voltal, ezert kirugott a szerver.^"",userid)
  29.  
  30.                             log_amx("Spec Kick: ^"%s<%d><%s>^" specbol kirugva.)", name,userid,authid)
  31.                         }
  32.                     }
  33.                 }
  34.             }
  35.         }
  36.         }
  37.         return PLUGIN_CONTINUE
  38. }
  39.  
  40. public plugin_init() {
  41.         register_plugin("Spec Kick","1.0","foo.bar")
  42.     register_event("RoundTime", "Round_Time", "bc")
  43.  
  44.         return PLUGIN_CONTINUE
  45. }
  46. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  47. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
  48. */

Szerző:  kengurumancs [2015.12.30. 21:40 ]
Hozzászólás témája:  Re: Néző kick

Ez akkor rúgja ki specből a játékost ha 60mp-nél tovább tartózkodik bent.

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