Hello, i have problems with this plugin and i search for help.
This is the plugin :
HTML Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <reapi>
#define FLAG ADMIN_BAN
public plugin_init() {
register_plugin("Change team via command", "0.1", "He3aBuCuM")
register_clcmd("say /te", "cmdTe")
register_clcmd("say /ct", "cmdCt")
register_clcmd("say /spec", "cmdSpec")
}
public cmdTe(id) {
if(get_user_flags(id) & FLAG) {
cs_set_user_team(id, CS_TEAM_T)
rg_round_respawn(id)
cs_set_user_bpammo(id, CSW_GLOCK18, 40)
}
return PLUGIN_CONTINUE
}
public cmdCt(id) {
if(get_user_flags(id) & FLAG) {
cs_set_user_team(id, CS_TEAM_CT)
rg_round_respawn(id)
cs_set_user_bpammo(id, CSW_USP, 24)
}
return PLUGIN_CONTINUE
}
public cmdSpec(id) {
if(get_user_flags(id) & FLAG) {
cs_set_user_team(id, CS_TEAM_SPECTATOR)
client_cmd(id, "kill")
cs_set_user_deaths(id, cs_get_user_deaths(id)-1)
set_user_frags(id, get_user_frags(id)+1)
}
return PLUGIN_CONTINUE
}
And this is the problem :
For steam players - The typing /spec doesn't work and displays us as spectators, but in fact, we still play as ghosts.
For non-steam players - The weapons can't be changed when we pass from /spec to a team.