Raised This Month: $ Target: $400
 0% 

Solved Run time error 10: native error (native "cs_get_user_team")


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-07-2017 , 22:06   Re: Run time error 10: native error (native "cs_get_user_team")
Reply With Quote #2

Code:
// Transfer a player to spec.
public TransferToSpec(id)
{
	new CsTeams:team = cs_get_user_team(id)

	if(is_user_connected(id) && !(team == CS_TEAM_SPECTATOR) && !(team == CS_TEAM_UNASSIGNED) )
	// if(is_user_connected(id) && !(team == CS_TEAM_UNASSIGNED) )
	{
		new TransferedName[32] 
		get_user_name(id, TransferedName, charsmax(TransferedName))

		user_silentkill(id)
		cs_set_user_team(id, CS_TEAM_SPECTATOR)
	}
	
	return PLUGIN_HANDLED
}
-->
Code:
// Transfer a player to spec.
public TransferToSpec(id)
{
	if(is_user_connected(id))
	{
		new CsTeams:team = cs_get_user_team(id)

		if(!(team == CS_TEAM_SPECTATOR) && !(team == CS_TEAM_UNASSIGNED) )
		// if(is_user_connected(id) && !(team == CS_TEAM_UNASSIGNED) )
		{
			new TransferedName[32] 
			get_user_name(id, TransferedName, charsmax(TransferedName))

			user_silentkill(id)
			cs_set_user_team(id, CS_TEAM_SPECTATOR)
		}
	}
	
	return PLUGIN_HANDLED
}
zmd94 is offline
 



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 22:44.


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