Raised This Month: $ Target: $400
 0% 

How to send player to spectators in right way?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kellan123
AlliedModders Donor
Join Date: Aug 2012
Old 06-06-2013 , 15:56   Re: How to send player to spectators in right way?
Reply With Quote #1

try this

PHP Code:
#include <amxmodx>
#include <cstrike>
 
public plugin_init()
{
register_clcmd("say /spec""spec_go")
 
register_clcmd("say /unspec""spec_back")
}
 
public 
spec_go(id)
{
if(
is_user_alive(id))
{
cs_set_user_team(idCS_TEAM_SPECTATOR)
user_kill(id1)
}
 
public 
spec_back(id)
{
if (
cs_get_user_team(id) == CS_TEAM_SPECTATOR)
cs_set_user_team(idrandom_num(12))


Last edited by Kellan123; 06-06-2013 at 16:02.
Kellan123 is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 06-07-2013 , 02:24   Re: How to send player to spectators in right way?
Reply With Quote #2

Quote:
Originally Posted by Kellan123 View Post
try this

PHP Code:
#include <amxmodx>
#include <cstrike>
 
public plugin_init()
{
register_clcmd("say /spec""spec_go")
 
register_clcmd("say /unspec""spec_back")
}
 
public 
spec_go(id)
{
if(
is_user_alive(id))
{
cs_set_user_team(idCS_TEAM_SPECTATOR)
user_kill(id1)
}
 
public 
spec_back(id)
{
if (
cs_get_user_team(id) == CS_TEAM_SPECTATOR)
cs_set_user_team(idrandom_num(12))

Better to make sure player die before transfer him to Spectator team.
yokomo is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 06-07-2013 , 07:21   Re: How to send player to spectators in right way?
Reply With Quote #3

Quote:
Originally Posted by Kellan123 View Post
try this

PHP Code:
#include <amxmodx>
#include <cstrike>
 
public plugin_init()
{
register_clcmd("say /spec""spec_go")
 
register_clcmd("say /unspec""spec_back")
}
 
public 
spec_go(id)
{
if(
is_user_alive(id))
{
cs_set_user_team(idCS_TEAM_SPECTATOR)
user_kill(id1)
}
 
public 
spec_back(id)
{
if (
cs_get_user_team(id) == CS_TEAM_SPECTATOR)
cs_set_user_team(idrandom_num(12))

with your code, the hud will disappear
.Dare Devil. 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 16:15.


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