Portugal
Пользователь
- Регистрация
- 2 Мар 2018
- Сообщения
- 257
- Симпатии
- 5
- Предупреждения
- 60
- Пол
- Мужской
Здравствуйте помогите настроить плагин чтобы он работал только с 3 раунда ![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Код:
/* © 2014 AMX-X - L]Ep6Ep. */
#include <amxmodx>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>
#if AMXX_VERSION_NUM < 183
#include <colorchat>
#endif
new firstsplayers, firstsplayerr, cvar_round, cvar_money,
cvar_players, cvar_te, cvar_ct, cvar_timegod, Curret_Round, Float:firsttime, cvar_time1, cvar_time2;
public plugin_init() {
register_plugin("FirstPlayersRespawn", "1.0 beta", "L]Ep6Ep.")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_event("TextMsg", "event_game_restart", "a", "2=#Game_will_restart_in")
register_event("TextMsg", "event_game_restart", "a", "2=#Game_Commencing")
}
public plugin_cfg() {
server_cmd("exec addons/amxmodx/configs/FirstPlayersRespawn.cfg")
cvar_te = register_cvar("fpr_players_t", "2")
cvar_ct = register_cvar("fpr_players_ct", "2")
cvar_time1 = register_cvar("fpr_time", "30")
cvar_round = register_cvar("fpr_firstround", "3")
cvar_players = register_cvar("fpr_minplayers", "10")
cvar_timegod = register_cvar("fpr_protection", "3")
cvar_money = register_cvar("fpr_money", "650")
cvar_time2 = register_cvar("fpr_time_death", "3")
}
public client_death(killer, victim) {
if(Curret_Round < get_pcvar_num(cvar_round) || get_playersnum() < get_pcvar_num(cvar_players) || get_gametime() > firsttime) {
if(firstsplayers < get_pcvar_num(cvar_te)) {
if(get_user_team(victim) == 1) {
firstsplayers++
set_task(get_pcvar_float(cvar_time2), "respawn", victim)
client_print_color(victim, print_team_default, "^1[^4MSFK^1] ^3Jūs būsite gyvas už ^4%d ^3sek^1!", floatround(get_pcvar_float(cvar_time2)))
}
}
if(firstsplayerr < get_pcvar_num(cvar_ct)) {
if(get_user_team(victim) == 2) {
firstsplayerr++
set_task(get_pcvar_float(cvar_time2), "respawn", victim)
client_print_color(victim, print_team_default, "^1[^4MSFK^1] ^3Jūs būsite gyvas už ^4%d ^3sek^1!", floatround(get_pcvar_float(cvar_time2)))
}
}
}
}
public respawn(id) {
ExecuteHamB(Ham_CS_RoundRespawn, id)
cs_set_user_money(id, cs_get_user_money(id) + get_pcvar_num(cvar_money))
fm_set_user_godmode(id, 1)
set_task(get_pcvar_float(cvar_timegod), "offgodmod", id)
new name[32]
get_user_name(id, name, 31)
client_print_color(0, print_team_default, "^1[^4MSFK^1] ^3Žaidėjas: ^4%s ^3Buvo atgaivintas už drąsią^1!", name)
}
public offgodmod(id)
fm_set_user_godmode(id, 0)
public event_game_restart()
Curret_Round = 0
public event_round_start() {
firstsplayers = 0
firstsplayerr = 0
Curret_Round++
firsttime = get_gametime() + get_pcvar_float(cvar_time1)
}
/* © 2014 AMX-X - L]Ep6Ep. */