Raised This Month: $ Target: $400
 0% 

Printing out server_cmd to client console


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ngEAr
Member
Join Date: Jun 2009
Old 05-05-2010 , 03:59   Re: Printing out server_cmd to client console
Reply With Quote #1

Not really , im just making small plugin with rcon command inside it. So i wont need to give everyone rcon , that's why i need to make i cmd for outputting status.
Here is an idea how i made it now

public status1(id)
{
server_cmd("rcon_password elda",id)
client_cmd(id,"rcon_password elda")
client_cmd(id,"rcon status")
}

What should i add after 3rd string in order to remove rcon from the server , since for removing it uses arg "" and the cmd is inside of those "". As i understood set_cvar_string doesnt work for it , i wanted to make Set Task for it , so it removes it after ~10seconds.
ngEAr is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 05-05-2010 , 06:48   Re: Printing out server_cmd to client console
Reply With Quote #2

try this:
PHP Code:
public status1(id)
{
         
server_cmd("rcon_password elda",id)
         
client_cmd(id,"rcon_password elda")
         
client_cmd(id,"rcon status")

     
set_task(10.0"remove_rcon")
}

public 
remove_rcon()
    
server_cmd("rcon_password newpassword"
but i don't think rcon status will be a usefull command
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.

Last edited by drekes; 05-05-2010 at 06:52.
drekes is offline
Send a message via MSN to drekes
ngEAr
Member
Join Date: Jun 2009
Old 05-05-2010 , 07:19   Re: Printing out server_cmd to client console
Reply With Quote #3

Quote:
Originally Posted by drekes View Post
try this:
PHP Code:
public status1(id)
{
         
server_cmd("rcon_password elda",id)
         
client_cmd(id,"rcon_password elda")
         
client_cmd(id,"rcon status")

     
set_task(10.0"remove_rcon")
}

public 
remove_rcon()
    
server_cmd("rcon_password newpassword"
but i don't think rcon status will be a usefull command
An hour ago i did just like you wrote while checking set_task function , but anyway thanks. The thing is in order to remove rcon from server you must type rcon_password "" . So how it should look server_cmd("rcon_password "" ") ? I was trying to compile it , but argument is wrong.
ngEAr is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 05-05-2010 , 07:44   Re: Printing out server_cmd to client console
Reply With Quote #4

PHP Code:
"rcon_password "" " 

PHP Code:
server_cmd("rcon_password ^"^""
if you add " in other ", you must add a ^ infront of it. else it reads like 2 seperate arguments
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
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 03:39.


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