AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need stock...or code (https://forums.alliedmods.net/showthread.php?t=167724)

avril-lavigne 09-19-2011 07:55

Need stock...or code
 
Need stock to check free slots or occupated slots on remote server using sockets
I need like this :

if (freeslots >=2 )
do something

if (total_players > 30 )
do something

In remote server ... xredirect is too complicated for me.

jimaway 09-19-2011 08:46

Re: Need stock...or code
 
http://developer.valvesoftware.com/w...eries#A2S_INFO
heres the query and replay format if you want to code it yourself

avril-lavigne 09-19-2011 09:12

Re: Need stock...or code
 
Ill try , not sure if I can .(

Bugsy 09-19-2011 12:56

Re: Need stock...or code
 
http://forums.alliedmods.net/showthread.php?t=142858

avril-lavigne 09-19-2011 13:30

Re: Need stock...or code
 
thanks I will look thru.

but whats wrong with this code

I cant send my data correctly


PHP Code:

#include <amxmodx>
#include <amxmisc>
#include < server_comm >



public plugin_init() {
    
register_plugin("Advanced redirect"AMXX_VERSION_STR"idiot(((")
    
set_task(5.0,"MapLoaded",_,_,_,"b")
}


public 
MapLoaded()
{        
        new 
send_data get_maxplayers() - get_playersnum() 
        
        
scomm_sendf"loopback""%s"send_data)        
}


public 
scomm_receiveszData[ ], iLen )
{
    
log_amx"Received data: %s"szData );


str_to_num is useless . maxplayers is a number itself...what to do
Recieved data is : * empty or some funny symbols.

avril-lavigne 09-19-2011 13:41

Re: Need stock...or code
 
forget

http://forums.alliedmods.net/showthread.php?t=142858


Amazing THINGGGGGGGGGGGG


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

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