Raised This Month: $ Target: $400
 0% 

Transfer with immunity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 06-08-2007 , 16:18   Transfer with immunity
Reply With Quote #1

Anybody see here why it would obey the immunity flag? The cmd_target is 0.. I cant figure it out:

Code:
public cmd_transfer(id, level, cid) 
{
	if (!cmd_access(id, level, cid, 2))
	return PLUGIN_HANDLED
	
	new arg1[32], arg2[32]
	
	read_argv(1, arg1, 31)
	read_argv(2, arg2, 31)
	
	new player = cmd_target(id, arg1, 0)
	
	if(!player)
		return PLUGIN_HANDLED
	
	new teamname[32]
	
	if(!strlen(arg2))
	{
		cs_set_user_team(player, cs_get_user_team(player) == CS_TEAM_CT ? CS_TEAM_T:CS_TEAM_CT)
		teamname = cs_get_user_team(player) == CS_TEAM_CT ? "Counter-Terrorists":"Terrorists"
	}
	else
	{
		if(equali(arg2, "T"))
		{
			cs_set_user_team(player, CS_TEAM_T)
			teamname = "Terrorists"
		}
		else if(equali(arg2, "CT"))
		{
			cs_set_user_team(player, CS_TEAM_CT)
			teamname = "Counter-Terrorists"
		}
		else if(equali(arg2, "SPEC"))
		{
			user_silentkill(player)
			cs_set_user_team(player, CS_TEAM_SPECTATOR)
			
			teamname = "Spectator"
		}
		else
		{
			client_print(id, print_console, "[AMX_SUPER] Invalid team specified!")
			return PLUGIN_HANDLED
		}
	}
	
	new name[32], admin[32], steamid[38]
	
	get_user_name(id, admin, 31)
	get_user_name(player, name, 31)
	
	get_user_authid(id, steamid, 37)
	
	client_print(id, print_console, "%L", LANG_PLAYER, "AMX_SUPER_TRANSFER_PLAYER", name, teamname)
	client_print(player, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_TRANSFER_PLAYER_TEAM", teamname)
	
	log_amx("%L", LANG_PLAYER, "AMX_SUPER_TRANSFER_PLAYER_LOG", admin, steamid, name, teamname)
	
	return PLUGIN_HANDLED
}
__________________
bmann_420 is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-08-2007 , 16:29   Re: Transfer with immunity
Reply With Quote #2

put the cmd_target 3rd arg 8
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:35.


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