Page 4 of 4

Re: gg_winner_display

PostPosted: Wed Jul 22, 2009 2:19 am
by slipknot
If you save the code as gg5_win.php then change the gungame5.com to thebucketsplace.com it should work

Re: gg_winner_display

PostPosted: Wed Jul 22, 2009 2:29 am
by BucKeT
slipknot wrote:If you save the code as gg5_win.php then change the gungame5.com to thebucketsplace.com it should work
Sweet deal, thanks for the help guys.

Re: gg_winner_display

PostPosted: Sun Aug 02, 2009 5:39 pm
by BucKeT
Ok, Im still missing something here. I feel like an idiot but I'm still doing something wrong. Below is the code I changed.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GunGame Winner</title>
<style type="text/css">
body {
background:#FFFF00;
font-family:Verdana,Tahoma;
color:#000000;
vertical-align:middle;
}
</style>
</head>
<body>
<table height="100%" topmargin="0" bottommargin="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center" valign="middle">
<td valign="middle">
<table><tr><td>
<img src="http://www.gungame5.com/images/gungame5_logo.png">&nbsp;&nbsp;</td><td>
<b><?php print ($_GET["winnerName"]); ?></b> Won!<hr><br />
<b><?php print ($_GET["winnerName"]); ?></b> won the game by killing <b><?php print ($_GET["loserName"]); ?></b><br /><br />
<b>Stats:</b><br />
Wins: <b><?php print ($_GET["wins"]); ?></b><br />
Place: <b><?php print ($_GET["place"]); ?></b> of <b><?php print ($_GET["totalPlaces"]); ?></b></td></tr><tr><td colspan="2" align="center"><br><br>Join our forums <a href="http://thebucketsplace.com">http://www.thebucketsplace.com</a></td></tr></table></td></tr></table>
</body>
</html>
I also changed the path to my server, example below.

// Enable / Disable gg_winner_display
// Enable = 1 / Disable = 0
gg_winner_display 1

// Custom web page
// Leave this as default unless you want to have a customised winner page (hosted on your own web server).
// If you want to host the file on your web server, the file is here: viewtopic.php?f=17&t=162
//
// Default = http://gungame5.com/gg5_win.php
gg_winner_display_page "http://thebucketsplace5.com/gg5_win.php"

Do I have to place an image of this on my web server? Where do I place the changed code? Thanks

PostPosted: Sun Aug 02, 2009 6:22 pm
by Warren
http://thebucketsplace5.com doesn't seem to be a real website.

Re: gg_winner_display

PostPosted: Sun Aug 02, 2009 8:22 pm
by BucKeT
oooops, "http://thebucketsplace.com/gg5_win.php" I left out the slash. This still does not work so I'm still missing something :(

PostPosted: Mon Aug 03, 2009 12:05 am
by Warren
Go to the link you are setting it to:

http://thebucketsplace.com/gg5_win.php

There is nothing there.

gg_winner_display FTW

PostPosted: Sun Oct 18, 2009 7:07 pm
by MasterKill
Image

Thanks for this :) Modded the style a bit :p http://www.dutchangelspro.nl/mkcss/winner.php

Re: gg_winner_display

PostPosted: Sun Nov 01, 2009 4:05 pm
by WebJunkie
i'd like to post up the winners from month to month, i save previous winnersdata.db and save them for the month. is there a way to easily convert the information to readable info so that it can be published on a website? that way for each month i can have different ranking.

Re: gg_winner_display

PostPosted: Tue Nov 03, 2009 6:51 pm
by Warren
WebJunkie wrote:i'd like to post up the winners from month to month, i save previous winnersdata.db and save them for the month. is there a way to easily convert the information to readable info so that it can be published on a website? that way for each month i can have different ranking.

Since this is not related to the gg_winner_display custom addon, I suggest that you post about it in the Script Requests forum.

Re: gg_winner_display

PostPosted: Tue Mar 02, 2010 7:04 am
by danfocus
Maybe better use
<?php print (htmlspecialchars($_GET["winnerName"])); ?>

instead
<?php print ($_GET["winnerName"]); ?>

PostPosted: Fri Mar 05, 2010 12:54 pm
by metalfa_n1
Is there any way to show/add the winner name at hostname?

For example:

Hostname = "Server teste - Gungame" + Last winner: Metalfã_nº1.

Re:

PostPosted: Fri Mar 05, 2010 8:55 pm
by Warren
metalfa_n1 wrote:Is there any way to show/add the winner name at hostname?

For example:

Hostname = "Server teste - Gungame" + Last winner: Metalfã_nº1.

To do so you would need to host the PHP file on your own site. You could add this to the PHP file in the original post:
<?php print ($_GET["hostName"]); ?>
Remember to point to your own site in the configuration file.

Next you would have to modify the end of ../addons/eventscripts/gungame/custom_addons/gg_winner_display/gg_winner_display.py to be something like:
# ==============================================================================
#   GAME EVENTS
# ==============================================================================
def gg_win(event_var):
    # Format variables
    hostname = str(es.ServerVar("hostname"))
    attacker = event_var['attacker']
    attackername = es.getplayername(attacker).replace('&','%26')
    username = es.getplayername(event_var['userid']).replace('&','%26')
    steamid = es.getplayersteamid(attacker)
    wins = gungamelib.getWins(steamid)
    place = gungamelib.getWinnerRank(steamid) if steamid != 'BOT' else 'BOT'
    totalPlaces = gungamelib.getTotalWinners()
   
    # Send MOTD
    gamethread.delayed(0.5, sendDisplay, (hostname, attackername, username, wins, place, totalPlaces))

# ==============================================================================
#   HELPER FUNCTIONS
# ==============================================================================
def sendDisplay(hostname, attackername, username, wins, place, totalPlaces):
    for userid in es.getUseridList():
        usermsg.motd(userid, 2, 'GunGame Winner', '%s?hostName=%s&winnerName=%s&loserName=%s&wins=%s&place=%s&totalPlaces=%s' % (gungamelib.getVariableValue('gg_winner_display_page'), hostname, attackername, username, wins, place, totalPlaces))

Re: gg_winner_display

PostPosted: Sun Mar 28, 2010 10:40 pm
by candyland
Is there a way to get a custom background? I have set it up like this but nothing comes up what am i doing wrong?. thanks


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>GunGame Winner</title>
<style type="text/css">
body {



background:#000000;
font-family:Verdana,Tahoma;
color:#F2F5A9;
vertical-align:middle;
background: url(http://mysite.com/222.jpg)
background-attachment: fixed;
background-repeat: no-repeat;
background-position: center;



}

</style>
</head>
<body>
<table height="100%" topmargin="0" bottommargin="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center" valign="middle">
<td valign="middle">
<table><tr><td>

<img src="http://www.gungame5.com/images/gungame5_logo.png">&nbsp;&nbsp;</td><td>
<b><?php print ($_GET["winnerName"]); ?></b> Won!<hr><br />
<b><?php print ($_GET["winnerName"]); ?></b> won the game by killing <b><?php print ($_GET["loserName"]); ?></b><br /><br />
<b>Stats:</b><br />
Wins: <b><?php print ($_GET["wins"]); ?></b><br />
Place: <b><?php print ($_GET["place"]); ?></b> of <b><?php print ($_GET["totalPlaces"]); ?></b></td></tr><tr><td colspan="2" align="center"><br><br>Powered by <a href="http://gungame5.com">http://www.gungame5.com</a></td></tr></table></td></tr></table>
</body>
</html>