AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Find Players on GameTiger (https://forums.alliedmods.net/showthread.php?t=404)

IceMouse[WrG] 03-21-2004 17:04

Find Players on GameTiger
 
1 Attachment(s)
This looks up a player on GameTiger
I took some code from f117bomb's "Web Browser"(Specifically to extract /findplayer from the say command)
Any suggestions welcome... Although it is impossible to join the same server as a person(You need to write down the IP), nor is it possible to pull up the specific server info from a persons name, so don't ask

BTW, it will only look up people on your mod, as it is impossible to join a server using another mod

IceMouse[WrG] 03-22-2004 21:33

Now uses amxmodx.inc, as requested

BAILOPAN 03-22-2004 21:42

speaking of which - what happened to gametiger.net?
It was a large portal then it went down for like a week. now it's totally stripped.

IceMouse[WrG] 03-23-2004 15:16

Yes... But thats alright for this plugin... Less downloads in-game for the user, I suppose

FlyingMongoose 03-24-2004 22:09

1 Attachment(s)
yo, I liked your idea, so I modified it a bit :). It now has a w00t player search too. I also attempted server spy, but since that uses a lot of javascript and the Steam motd web browser engine thing won't read javascript it wouldn't work. I also don't think my say commands work...I don't know why like "/w00tfind <name>" and "/gtfind <name>".

And I don't mind the stripped down gametiger, looks better in CS motd anyway, lol.

Code:

/*
 * Playerseach 1.0 by: [SMS]FlyingMongoose | [email protected]
 * Original Code and Concept by (C) IceMouse[WrG] 2004
 *
 * Changelog
 * 1.0 - Added w00t Player Search Support
 *         
 * w00t lookup
 * commands:
 * say /w00tfind <name>
 * amx_w00tfind <name>
 *
 * gametiger lookup
 * Commands:
 * say /gtfind <name>
 * amx_gtfind <name>
 */

#include <amxmodx>

public plugin_init()
{
        register_clcmd("say","cmdSay",0,"/gtfind <name> - Searches online for a player");
        register_clcmd("amx_gtfind","cmdFindPlayer", 0, "<name> - Searches online for a player");
        register_clcmd("say","WcmdSay",0,"/w00tfind <name> - Searches online for a player");
        register_clcmd("amx_w00tfind","WcmdFindPlayer", 0, "<name> - Searches online for a player");

}

//w00t Search
public WShowFind(id,name[])
{
        new URL[128];
        new Title[128];
        format(Title,127,"Searching for player: %s using w00t.phxx.net",name);
        while(contain(name," ") != -1)
        {
                replace(name, 49, " ", "+");
        }
        format(URL,127,"http://w00t.phxx.net/default.asp?s=Player&sString=%s&Search=W00T%21+Player+Search

",name);
        show_motd(id,URL,Title);
        return 1;
}



public WcmdFindPlayer(id)
{
        new name[50];
        read_argv(1,name,49);
        WShowFind(id,name);
        return PLUGIN_HANDLED;
}

public WcmdSay(id)
{
        new text[64], cmd[32], name[32];
        read_args(text,63);
        remove_quotes(text);
        parse(text, cmd, 31, name, 31);
               
        if(equali(cmd, "/w00tfind"))
                WShowFind(id,name);
        return PLUGIN_HANDLED;
}

// Gametiger Search
public ShowFind(id,name[])
{
        new mod[20];
        get_modname(mod,19);
        new URL[128];
        new Title[128];
        format(Title,127,"Searching for player: %s using GameTiger.net",name);
        while(contain(name," ") != -1)
        {
                replace(name, 49, " ", "+");
        }
        format(URL,127,"http://gametiger.net/search?player=%s&game=%s",name,mod);
        show_motd(id,URL,Title);
        return 1;
}

public cmdFindPlayer(id)
{
        new name[50];
        read_argv(1,name,49);
        ShowFind(id,name);
        return PLUGIN_HANDLED;
}

public cmdSay(id)
{
        new text[64], cmd[32], name[32];
        read_args(text,63);
        remove_quotes(text)        ;
        parse(text, cmd, 31, name, 31);
               
        if(equali(cmd, "/gtfind"))
                ShowFind(id,name);
        return PLUGIN_HANDLED;
}


IceMouse[WrG] 03-24-2004 22:12

I was going to do w00t... But its only for CS

FlyingMongoose 03-24-2004 22:15

yeah, phxx was founded on the CS community. I wanted to do serverspy, but there's no javascript handling for HL motds yet. Though I technically had it working, it should have worked right had it been on the old serverspy system.

but would you be able to tell me why my say commands aren't working?

IceMouse[WrG] 03-25-2004 09:18

Yeah... I looked into them before writing this, and GameTiger was cross-mod and worked, so that made it the best choice... Even though w00t has a more friendly interface

SubStream 05-08-2006 01:33

Awesome plugin I went to the last page to see what plugins there were that I haven't heard of and this is definetly a good plugin to track regs and admins to see where else they play at.

seoulxkorean 05-09-2006 17:32

Is it possible to catch the URL of a motd if say the page were to redirect to another page in amxx scripting?


All times are GMT -4. The time now is 09:21.

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