View Single Post
splewis
Veteran Member
Join Date: Feb 2014
Location: United States
Old 06-04-2014 , 23:04   Re: [CS:GO] Multi-1v1 (v0.3.1, 2014-5-30)
Reply With Quote #10

Quote:
Originally Posted by versatile_bfg View Post
It would also be good if you could release that !rank part as well. =)
Well, there isn't much server logic in that. The reason it's removed (it's actually probably in the git repo history still, too) is that nothing happens on the game server, it's just a web page.

Here's the plugin code, if you're curious:


Code:
public Action:Command_Stats(client, args) {
    new String:arg1[32];
    if (args >= 1 && GetCmdArg(1, arg1, sizeof(arg1))) {
        new target = FindTarget(client, arg1, true, false);
        if (target != -1) {
            ShowStatsForPlayer(client, target);
        }
    } else {
        ShowStatsForPlayer(client, client);
    }

    return Plugin_Handled;
}

public ShowStatsForPlayer(client, target) {
    decl String:url[255];
    Format(url, sizeof(url), "http://csgo1v1.splewis.net/redirect_stats/%d", GetSteamAccountID(target));
    ShowMOTDPanel(client, "Multi-1v1 Stats", url, MOTDPANEL_TYPE_URL);
}
Now, the logical response would be "can you open-source your website code too?". Well, I can, but probably won't. I'm not a web developer whatsoever, and my website was just thrown together as quickly as I could using python. (I'll die before I spend hours writing php and javascript)

I just googled randomly until I could get apache and flask to work. I'm probably the worst person to talk to about anything website-related.


Quote:
Originally Posted by maRoff View Post
It possibly to add language support?
What kind of gametype shoud be used at dedicated server?
I'll see if I can do language support soon. The reason I didn't do it already is because I haven't figured out how to intermix it with colors in CS:GO yet. I'm sure it's not too hard, I just haven't found the right way to do it. (in fact, my coloring is hard-coded into the hex values in the plugin, which is gross). If someone can point me to the right include/library/version to do colors within translation strings I'd be so happy. From my cursory glance smlib won't work with GO and I couldn't tell which versions of color.inc would work.

As for gametypes - that's a good question. I launch things under competitive, but it shouldn't really matter. I should add a note that the cfg file packed cfg/sourcemod/multi1v1/game_cvars.cfg sets a bunch of cvars on map start, and you're free to edit it.
__________________

Last edited by splewis; 06-04-2014 at 23:05.
splewis is offline