Raised This Month: $ Target: $400
 0% 

[REQ] Send information from the plugin (pawn) to the web (php) through mysql


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zhulo
Senior Member
Join Date: Jun 2010
Location: Slovakia
Old 07-14-2012 , 12:29   [REQ] Send information from the plugin (pawn) to the web (php) through mysql
Reply With Quote #1

Hello. I wanted to find some tutorials and informations about this but I did not find anything understandable. So I decided to ask for help. I wanna make a server status for my website, which will get informations right from the server through the mysql (or some better connection server/web if u know). I can make the pawn code but i dont know how to connect it to the web.

Here are some things which I wanna connect (pawn)

Connected players count and max players:

PHP Code:
public plugin_init()
{
    
g_maxplayers get_maxplayers()
}

getconnected()
{
    static 
iConnectedid
    iConnected 
0
    
    
for (id 1id <= g_maxplayersid++)
    {
        if (
is_user_connected(id))            
            
iConnected++
    }
    
    return 
iConnected;

Current map name:

PHP Code:
    new map[32]
    
get_mapname(map31
Of course there will be much more informations, this is just an example.

So, when I have the pawn code and the .amxx plugin, now I need to take this informations right to the web (php).

The table should look like this:

[IMG]http://img338.**************/img338/5376/statuuus.jpg[/IMG]


Can someone help me to make it?
zhulo is offline
Send a message via ICQ to zhulo Send a message via Skype™ to zhulo
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-14-2012 , 13:12   Re: [REQ] Send information from the plugin (pawn) to the web (php) through mysql
Reply With Quote #2

Better yet, query the server through the master servers, you can get all that information plus more. No need to an AMXX plugin
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
zhulo
Senior Member
Join Date: Jun 2010
Location: Slovakia
Old 07-14-2012 , 13:15   Re: [REQ] Send information from the plugin (pawn) to the web (php) through mysql
Reply With Quote #3

I need to get the informations right from the plugins.
zhulo is offline
Send a message via ICQ to zhulo Send a message via Skype™ to zhulo
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-14-2012 , 13:18   Re: [REQ] Send information from the plugin (pawn) to the web (php) through mysql
Reply With Quote #4

But you can get all 4 columns from just querying the master servers, no need for a plugin.

If you do require more than that, maybe set them to a public cvar and then query the server rules and pull the values that way? Or use sockets?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
zhulo
Senior Member
Join Date: Jun 2010
Location: Slovakia
Old 07-14-2012 , 13:21   Re: [REQ] Send information from the plugin (pawn) to the web (php) through mysql
Reply With Quote #5

Im using it now, but it is very slow and it takes much more time to connect, so the page is loading longer...

I have a reasons for make it like I said...

Last edited by zhulo; 07-14-2012 at 13:22.
zhulo is offline
Send a message via ICQ to zhulo Send a message via Skype™ to zhulo
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 07-14-2012 , 13:23   Re: [REQ] Send information from the plugin (pawn) to the web (php) through mysql
Reply With Quote #6

What information you need ? if its a cvar like MrYami says , you can use sockets, or a Query Source.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
zhulo
Senior Member
Join Date: Jun 2010
Location: Slovakia
Old 07-14-2012 , 13:25   Re: [REQ] Send information from the plugin (pawn) to the web (php) through mysql
Reply With Quote #7

ok, I need the current map, current players count, max players, and time left.
zhulo is offline
Send a message via ICQ to zhulo Send a message via Skype™ to zhulo
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 07-14-2012 , 13:27   Re: [REQ] Send information from the plugin (pawn) to the web (php) through mysql
Reply With Quote #8

Use this, its better to load or store info in SQL.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
zhulo
Senior Member
Join Date: Jun 2010
Location: Slovakia
Old 07-14-2012 , 13:37   Re: [REQ] Send information from the plugin (pawn) to the web (php) through mysql
Reply With Quote #9

I am using it now, but, like I said, its very slow, so, I need to get info right from the amx plugins.
zhulo is offline
Send a message via ICQ to zhulo Send a message via Skype™ to zhulo
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 07-14-2012 , 13:51   Re: [REQ] Send information from the plugin (pawn) to the web (php) through mysql
Reply With Quote #10

Spoiler


Well , this dont have relation with amxx i think , you should post in offtopic ..
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
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 15:28.


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