How can I deactivate this steam bonus for the T flag? Disable it for VIP.
Цитата
#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <cstrike>
#include <colorchat>
new bool:playerPutOrAuth[33]
new g_steam[33]
new pcvar_dp_r_id_provider
new round_count
public plugin_init()
{
register_plugin("Steam Bonus", "1.2", "Cruel")
register_event("TextMsg", "RoundRestart", "a", "2=#Game_Commencing", "2=#Game_will_restart_in")
register_logevent("logevent_round_start",2, "1=Round_Start")
RegisterHam(Ham_Spawn, "player", "player_spawn", 1)
pcvar_dp_r_id_provider = get_cvar_pointer ("dp_r_id_provider")
}
public logevent_round_start()
{
round_count++
}
public RoundRestart(id)
{
round_count = 1
}
public client_connect(id)
{
g_steam[id] = 0
playerPutOrAuth[id] = false;
}
public client_authorized(id)
{
if (playerPutOrAuth[id])
{
return check_client_type(id)
}
playerPutOrAuth[id] = true;
return PLUGIN_CONTINUE;
}
public client_putinserver(id)
{
if (playerPutOrAuth[id])
{
return check_client_type(id)
}
playerPutOrAuth[id] = true;
return PLUGIN_CONTINUE;
}
public player_spawn(id)
{
if(is_user_alive(id) && g_steam[id] && round_count > 1)
{
give_item(id, "item_assaultsuit")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_hegrenade")
ColorChat(id, RED, "[SS]^1 Ai primit bonus pentru ca folosesti ^4steam^1.")
}
}
check_client_type(id)
{
if (!pcvar_dp_r_id_provider)
return PLUGIN_CONTINUE
server_cmd("dp_clientinfo %d", id)
server_exec()
new authprov = get_pcvar_num(pcvar_dp_r_id_provider)
if (authprov == 2)
{
g_steam[id] = true
}
return PLUGIN_CONTINUE
}