AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Switch Player to Spectator (https://forums.alliedmods.net/showthread.php?t=338946)

XSlayer 08-04-2022 21:24

Switch Player to Spectator
 
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


fysiks 08-05-2022 00:20

Re: Switch Player to Spectator
 
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.

XSlayer 08-05-2022 00:22

Re: Switch Player to Spectator
 
Quote:

Originally Posted by fysiks (Post 2785607)
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

fysiks 08-05-2022 01:10

Re: Switch Player to Spectator
 
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.

XSlayer 08-05-2022 02:38

Re: Switch Player to Spectator
 
Quote:

Originally Posted by fysiks (Post 2785616)
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

fysiks 08-05-2022 03:13

Re: Switch Player to Spectator
 
Quote:

Originally Posted by XSlayer (Post 2785619)
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.

EFFx 08-05-2022 03:23

Re: Switch Player to Spectator
 
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.

gabuch2 08-05-2022 11:42

Re: Switch Player to Spectator
 
?????

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.

wilian159 08-05-2022 23:35

Re: Switch Player to Spectator
 
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.

MrPickles 08-08-2022 17:23

Re: Switch Player to Spectator
 
PHP Code:

engclient_cmdClient"jointeam""3"); 

maybe with?


All times are GMT -4. The time now is 15:39.

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