AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   sourcemod commands not working after adding them through rcon (https://forums.alliedmods.net/showthread.php?t=332157)

Daastan2k 04-27-2021 03:37

sourcemod commands not working after adding them through rcon
 
I am using the following sourcemod plugin :
HTML Code:

https://forums.alliedmods.net/showthread.php?p=2041122
to change player's team. I tried it out from admin account and it works like a charm. For eg :
Code:

sm_exchange
works fine input from console using admin account.

But when I try to use the same command from rcon like this :
Code:

rcon sm_exchange
it doesn't work. It doesn't even give an error or any other statement. I also tried
Code:

sm_rcon sm_exchange
but even that is not working. All the other basic commands like
Code:

sm_map
are working fine. I also made sure that sourcemod and metamod are installed.

I'm starting to think that this plugin can't be used through rcon. If that's the case then is there any other way through which I can move a player from ct to t through rcon ?

Thankyou in advance for any kind of help.

FAQU 04-27-2021 04:58

Re: sourcemod commands not working after adding them through rcon
 
Open up the movecommands.sp file, and look at line 1519.

It should look like this:

PHP Code:

if(!IsClientValid(client) || !IsClientValid(target)) 

Modify it to this and recompile:
PHP Code:

if(!IsClientValid(target)) 

Executing sm_exchange from rcon should work fine afterwards.

Daastan2k 04-28-2021 04:37

Re: sourcemod commands not working after adding them through rcon
 
Quote:

Originally Posted by FAQU (Post 2745187)
Open up the movecommands.sp file, and look at line 1519.

It should look like this:

PHP Code:

if(!IsClientValid(client) || !IsClientValid(target)) 

Modify it to this and recompile:
PHP Code:

if(!IsClientValid(target)) 

Executing sm_exchange from rcon should work fine afterwards.

For now I re-installed sourcemod and metamod and tried out a different plugin and it worked. But I will definately give this a try.


All times are GMT -4. The time now is 02:30.

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