Raised This Month: $32 Target: $400
 8% 

Rcon / HLTV Command stock


Post New Thread Reply   
 
Thread Tools Display Modes
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 06-03-2013 , 12:30   Re: Rcon / HLTV Command stock
Reply With Quote #11

Not in server frame, i tested with while loop but its freeze anyway
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 06-03-2013 , 13:36   Re: Rcon / HLTV Command stock
Reply With Quote #12

Quote:
Originally Posted by ^SmileY View Post
Not in server frame, i tested with while loop but its freeze anyway
That's the problem.

You don't have to loop. server_frame is part of the game loop.
Just check once for socket change at each server_frame.

Also be sure to disable socket blocking.

Check this thread: http://forums.alliedmods.net/showthread.php?p=1684863
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
kwpd
AlliedModders Donor
Join Date: Mar 2009
Location: panama
Old 11-03-2013 , 21:22   Re: Rcon / HLTV Command stock
Reply With Quote #13

FIX plz (( stop ---> stoprecording ))

PHP Code:
public HLTV_Stop(id,level,cid)
{
    if(!
cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
    
    
if(get_pcvar_num(hltv_cvar) == 1)
    {
        new 
szHost[32],szPass[32]
        
get_pcvar_string(p_Host,szHost,charsmax(szHost))
        
get_pcvar_string(p_Pass,szPass,charsmax(szPass))
        
        
Rcon_Command(szHost,get_pcvar_num(p_Port),szPass,"stop;disconnect;autoretry 0")
        
        
console_print(id,"%s O HLTV Disconnected!",g_HLTV)
    }
    return 
PLUGIN_HANDLED

---->
PHP Code:
public HLTV_Stop(id,level,cid)
{
    if(!
cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
    
    
if(get_pcvar_num(hltv_cvar) == 1)
    {
        new 
szHost[32],szPass[32]
        
get_pcvar_string(p_Host,szHost,charsmax(szHost))
        
get_pcvar_string(p_Pass,szPass,charsmax(szPass))
        
        
Rcon_Command(szHost,get_pcvar_num(p_Port),szPass,"stoprecording;disconnect;autoretry 0")
        
        
console_print(id,"%s O HLTV Disconnected!",g_HLTV)
    }
    return 
PLUGIN_HANDLED

__________________
kwpd is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 11-04-2013 , 07:11   Re: Rcon / HLTV Command stock
Reply With Quote #14

Quote:
Originally Posted by kwpd View Post
FIX plz (( stop ---> stoprecording ))

PHP Code:
public HLTV_Stop(id,level,cid)
{
    if(!
cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
    
    
if(get_pcvar_num(hltv_cvar) == 1)
    {
        new 
szHost[32],szPass[32]
        
get_pcvar_string(p_Host,szHost,charsmax(szHost))
        
get_pcvar_string(p_Pass,szPass,charsmax(szPass))
        
        
Rcon_Command(szHost,get_pcvar_num(p_Port),szPass,"stop;disconnect;autoretry 0")
        
        
console_print(id,"%s O HLTV Disconnected!",g_HLTV)
    }
    return 
PLUGIN_HANDLED

---->
PHP Code:
public HLTV_Stop(id,level,cid)
{
    if(!
cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
    
    
if(get_pcvar_num(hltv_cvar) == 1)
    {
        new 
szHost[32],szPass[32]
        
get_pcvar_string(p_Host,szHost,charsmax(szHost))
        
get_pcvar_string(p_Pass,szPass,charsmax(szPass))
        
        
Rcon_Command(szHost,get_pcvar_num(p_Port),szPass,"stoprecording;disconnect;autoretry 0")
        
        
console_print(id,"%s O HLTV Disconnected!",g_HLTV)
    }
    return 
PLUGIN_HANDLED

is same command not?

Code:
stop [<text>]  
  • disconnects from server, disconnects all clients and stops demo recording. Optional goodbye message.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 

Last edited by ^SmileY; 11-04-2013 at 07:15.
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
kwpd
AlliedModders Donor
Join Date: Mar 2009
Location: panama
Old 11-04-2013 , 17:18   Re: Rcon / HLTV Command stock
Reply With Quote #15

to use the command ""stop""
the person can not log back into the ""HLTV"" xD
__________________
kwpd is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 11-04-2013 , 20:01   Re: Rcon / HLTV Command stock
Reply With Quote #16

Quote:
Originally Posted by kwpd View Post
to use the command ""stop""
the person can not log back into the ""HLTV"" xD
Deppends what you need, for me HLTV enter in server, record and leave from server and automatically disconnecting all spectactors. But if you need to mantain HLTV online and connected to server but not recording, you shoud use only stoprecord command.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
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 16:42.


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