Raised This Month: $51 Target: $400
 12% 

Switch Player to Spectator


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XSlayer
Member
Join Date: Dec 2021
Old 08-04-2022 , 21:24   Switch Player to Spectator
Reply With Quote #1

Hi!, i wanted to know how can i switch a player to Spectator without using cstrike:

PHP Code:
    client_cmd(id,"kill")
             
cs_set_user_team(idCS_TEAM_SPECTATOR

Last edited by XSlayer; 08-04-2022 at 21:24.
XSlayer is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-05-2022 , 00:20   Re: Switch Player to Spectator
Reply With Quote #2

There is no good reason to not use that function. Maybe explain what you are actually trying to achieve. If you're just trying to move them to spectator then use the function.
__________________

Last edited by fysiks; 08-05-2022 at 00:20.
fysiks is offline
XSlayer
Member
Join Date: Dec 2021
Old 08-05-2022 , 00:22   Re: Switch Player to Spectator
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
There is no good reason to not use that function. Maybe explain what you are actually trying to achieve. If you're just trying to move them to spectator then use the function.
cause i will add cstrike module only for that function, and I thought that it is unnecessary to add a library to only use that function, maybe there is another way to do it, thats why i askt that
XSlayer is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-05-2022 , 01:10   Re: Switch Player to Spectator
Reply With Quote #4

This has been discussed a million times. Just use it, it won't change the server performance in any significant way (and alternatives are often worse).

How do you expect to not have the cstrike module on a Counter-Strike server? There are default plugins that use it.
__________________
fysiks is offline
XSlayer
Member
Join Date: Dec 2021
Old 08-05-2022 , 02:38   Re: Switch Player to Spectator
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
This has been discussed a million times. Just use it, it won't change the server performance in any significant way (and alternatives are often worse).

How do you expect to not have the cstrike module on a Counter-Strike server? There are default plugins that use it.
first of all, ur saying thing that u event know, who said that is a counter strike server??,if you are going to answer something coherent, that the answer is not a supposition

I do not understand the mania of discussing things that are not relevant, I asked something very clearly, if there is another way that is not cstrike to do that, that's all
XSlayer is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-05-2022 , 03:13   Re: Switch Player to Spectator
Reply With Quote #6

Quote:
Originally Posted by XSlayer View Post
first of all, ur saying thing that u event know, who said that is a counter strike server??,if you are going to answer something coherent, that the answer is not a supposition

I do not understand the mania of discussing things that are not relevant, I asked something very clearly, if there is another way that is not cstrike to do that, that's all
Ummm, why would I not think it is a Counter-Strike server? You didn't say anything to even imply you're not running Counter-Strike and can't read your mind.
__________________
fysiks is offline
Old 08-05-2022, 03:18
madNezz
This message has been deleted by madNezz. Reason: time waste
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 08-05-2022 , 03:23   Re: Switch Player to Spectator
Reply With Quote #7

This is Scripting Help, we ARE allowed to discuss what's better for you to use. Using fakemeta will be another way of changing teams, but requires more code to update the scoreboard info, which as you discussed before, is not efficient since it consumes 0.01 more CPU usage.

Cstrike is the fastest, just use it and save yourself some time. Otherwise, use the Google for some seconds, pretty sure the first link is your answer.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 08-05-2022 at 03:26.
EFFx is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 08-05-2022 , 11:42   Re: Switch Player to Spectator
Reply With Quote #8

?????

cs_ implies it's a function exclusively for Counter-Strike. Maybe you should reformulate your question to ask how to send spectators on games that are not CS (which is possible, btw). But with that attitude I do not think many will be willing to help you.
__________________
gabuch2 is online now
wilian159
Member
Join Date: Dec 2013
Old 08-05-2022 , 23:35   Re: Switch Player to Spectator
Reply With Quote #9

don't try to find perfectionism, you'll only waste time, it's hard for you to understand that the module you use is irrelevant?, it won't improve anything on your server, use cstrike.
__________________
wilian159 is offline
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 08-08-2022 , 17:23   Re: Switch Player to Spectator
Reply With Quote #10

PHP Code:
engclient_cmdClient"jointeam""3"); 
maybe with?

Last edited by MrPickles; 08-08-2022 at 17:23.
MrPickles 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 15:57.


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