I want to lock the guns in the knife round
What I add to the code
What I add to the code
register_clcmd("say /restart", "cmd_rr", 0, "restart round")
public cmd_knives(id) {
#if defined ADMINS_ONLY
if (!access(id, ADMIN_LEVEL_A)) {
return PLUGIN_HANDLED
}
#endif
if (g_match_inprogress != 1) {
g_match_inprogress = 0
set_task(1.0, "restart_round", 0, "1", 1)
all_msg("knife round")
set_task(3.0, "strip_weapons")
set_task(4.0, "knife_msg")
} else {
}
return PLUGIN_CONTINUE
}
public strip_weapons() {
new plist_public[32], pnum_public
get_players(plist_public, pnum_public)
for (new i = 0; i < pnum_public; i++) {
if (is_user_connected(plist_public) == 1 && is_user_alive(plist_public) == 1){
strip_user_weapons(plist_public)
give_item(plist_public, "weapon_knife")
}
}
}
public cmd_knives(id) {
#if defined ADMINS_ONLY
if (!access(id, ADMIN_LEVEL_A)) {
return PLUGIN_HANDLED
}
#endif
if (g_match_inprogress != 1) {
g_match_inprogress = 0
set_task(1.0, "restart_round", 0, "1", 1)
all_msg("knife round")
set_task(3.0, "strip_weapons")
set_task(4.0, "knife_msg")
} else {
}
return PLUGIN_CONTINUE
}
public strip_weapons() {
new plist_public[32], pnum_public
get_players(plist_public, pnum_public)
for (new i = 0; i < pnum_public; i++) {
if (is_user_connected(plist_public) == 1 && is_user_alive(plist_public) == 1){
strip_user_weapons(plist_public)
give_item(plist_public, "weapon_knife")
}
}
}