AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Only if in spec (https://forums.alliedmods.net/showthread.php?t=309923)

blAck. 08-12-2018 13:48

Only if in spec
 
I wanted to make that player can only execute some command if he is in spectate and I did this:
Code:
    new iTeam = get_user_team(id);     if(iTeam == 1 || iTeam == 2) {         client_print(id, print_chat, "You have to be in spec!");         return PLUGIN_HANDLED;     }
That works fine but there is one problem.

When I'm in TT and I transfer to CT, while I'm transfering (while I'm in free look), i CAN execute that command. Please help :)

D4rkSiD3Rs 08-12-2018 14:06

Re: Only if in spec
 
Can you explain more ?

D4rkSiD3Rs 08-12-2018 15:21

Re: Only if in spec
 
Quote:

Originally Posted by EFFx (Post 2609823)
if(iTeam != 3)

It has the same meaning

blAck. 08-12-2018 15:27

Re: Only if in spec
 
Quote:

Originally Posted by EFFx (Post 2609823)
if(iTeam != 3)

As D4rkSiD3Rs said: "It has the same meaning"

fysiks 08-12-2018 16:19

Re: Only if in spec
 
Quote:

Originally Posted by blAck. (Post 2609827)
As D4rkSiD3Rs said: "It has the same meaning"

That was a useless post . . .

Have you tried any debugging? What value is shown as the team? Also, how are you able to send a command in the milliseconds it takes to change teams? (note that I don't play Counter-Strike so it might be different than what I'm used it; in Day of Defeat, the team change is nearly instant).

blAck. 08-12-2018 16:41

Re: Only if in spec
 
Quote:

Originally Posted by fysiks (Post 2609840)
That was a useless post . . .

Have you tried any debugging? What value is shown as the team? Also, how are you able to send a command in the milliseconds it takes to change teams? (note that I don't play Counter-Strike so it might be different than what I'm used it; in Day of Defeat, the team change is nearly instant).

Bro I marked this thread as "solved". Thanks for trying to help anyways.

fysiks 08-13-2018 02:18

Re: Only if in spec
 
So what was the solution?


All times are GMT -4. The time now is 12:31.

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