Hey guys, i need some help with this plugin "Every admin with flag F automaticly getting extra scout, but there is one problem, i can not have another gun when this plugin active, it just gives me scout, when i bought another weapon , my scout dissapire.Could you help me with it so i could use both weapon scout + any other weapon that im bought. Thanks.
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#define PLUGIN "Give Admin m3"
#define VERSION "1.0"
#define AUTHOR "The Specialist"
#define MAX_PLAYERS 32
new bool:g_restart_attempt[MAX_PLAYERS + 1];
new g_Switch;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
g_Switch = register_cvar("admin_give_scout","1");
register_event("ResetHUD", "event_hud_reset", "be");
register_clcmd("fullupdate", "clcmd_fullupdate") ;
register_event("TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in");
}
public clcmd_fullupdate()
{
return 1;
}
public event_restart_attempt()
{
new players[32], num;
get_players(players, num, "a");
for (new i; i < num; ++i)
{
g_restart_attempt[players[i]] = true;
}
}
public event_hud_reset(id)
{
if (g_restart_attempt[id])
{
g_restart_attempt[id] = false;
return;
}
event_player_spawn(id)
}
public event_player_spawn(id)
{
if(get_pcvar_num(g_Switch) &&( get_user_flags(id) & ADMIN_LEVEL_F))
{
give_item(id,"weapon_scout");
return 0;
}
return 1;
}