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

sourcemod commands not working after adding them through rcon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Daastan2k
New Member
Join Date: Apr 2021
Old 04-27-2021 , 03:37   sourcemod commands not working after adding them through rcon
Reply With Quote #1

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.
Daastan2k is offline
FAQU
Member
Join Date: Sep 2020
Location: Romania
Old 04-27-2021 , 04:58   Re: sourcemod commands not working after adding them through rcon
Reply With Quote #2

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.
__________________
FAQU is offline
Daastan2k
New Member
Join Date: Apr 2021
Old 04-28-2021 , 04:37   Re: sourcemod commands not working after adding them through rcon
Reply With Quote #3

Quote:
Originally Posted by FAQU View Post
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.
Daastan2k is offline
Reply


Thread Tools
Display Modes

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 10:09.


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