AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to block choosing of teams (https://forums.alliedmods.net/showthread.php?t=48595)

mateo10 12-15-2006 16:37

How to block choosing of teams
 
How do I block the choosing of teams, ie. I want to make all players spawn as terrorists when they connect and they cant choose teams after that.

stupok 12-15-2006 18:42

Re: How to block choosing of teams
 
http://forums.alliedmods.net/showthr...highlight=team

Hm... I guess if someone is ignorant enough to pay you for a userbar, they should have to pay to have one.

mateo10 12-17-2006 05:11

Re: How to block choosing of teams
 
Doesn't work at all when I implement the code in my plugin...

[ --<-@ ] Black Rose 12-17-2006 08:38

Re: How to block choosing of teams
 
Then post it...

mateo10 12-17-2006 09:24

Re: How to block choosing of teams
 
This is the plugin:
Code:
#include <amxmodx> #include <cstrike> #include <engine> #include <fun> public plugin_init() {     register_plugin("Free For All Deathmatch", "0.1", "MaTTe")     register_cvar("ffadm_enable", "1")     register_event("DeathMsg", "EventDeathMsg", "a")     remove_bomb()     return PLUGIN_CONTINUE } public client_putinserver(id) {     cs_set_user_team(id, CS_TEAM_T) } public EventDeathMsg(id) {     new Attacker = read_data(1)     new Victim = read_data(2)         if(Attacker && is_user_connected(Attacker) && get_user_team(Attacker) == get_user_team(Victim)) {         set_user_frags(Attacker, get_user_frags(Attacker)+1)         cs_set_user_deaths(id, cs_get_user_deaths(id)-1)     }     spawn(Victim) } public remove_bomb() {     new ent = find_ent_by_model(ent, "grenade", "v_c4.mdl")     remove_entity(ent) }
How do i implement that blocking of teams?

[ --<-@ ] Black Rose 12-17-2006 10:20

Re: How to block choosing of teams
 
? try it.
Code:
public team_select(id, key) {     engclient_cmd(id, "slot1")     return PLUGIN_HANDLED } public plugin_init() {     register_menucmd(register_menuid("Team_Select"),(1<<0)|(1<<1)|(1<<4)|(1<<5),"team_select")     register_menucmd(-2,(1<<0)|(1<<1)|(1<<4)|(1<<5),"team_select") }


All times are GMT -4. The time now is 06:55.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.