gg_winner_display

Area to post and download Custom Addons, as well as ask the author/users for help or support.

Re: gg_winner_display

Postby slipknot » Wed Jul 22, 2009 2:19 am

If you save the code as gg5_win.php then change the gungame5.com to thebucketsplace.com it should work
It's better to burn out, than fade away.
slipknot

Site Admin
Site Admin
User avatar
 
Posts: 72
Joined: Sun Sep 07, 2008 12:21 am
Location: Hawthorne, CA
Steam Friends Name: sfmeyer1
Xfire Name: slipknotsfm

Re: gg_winner_display

Postby BucKeT » Wed Jul 22, 2009 2:29 am

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.
Wear short sleeves "Support the right to bear arms"
BucKeT

Private
Private
User avatar
 
Posts: 40
Joined: Thu Dec 04, 2008 1:44 am
Location: Florida
Steam Friends Name: lomm_razz

Re: gg_winner_display

Postby BucKeT » Sun Aug 02, 2009 5:39 pm

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
Wear short sleeves "Support the right to bear arms"
BucKeT

Private
Private
User avatar
 
Posts: 40
Joined: Thu Dec 04, 2008 1:44 am
Location: Florida
Steam Friends Name: lomm_razz

Postby Warren » Sun Aug 02, 2009 6:22 pm

http://thebucketsplace5.com doesn't seem to be a real website.
Warren

Site Admin
Site Admin
 
Posts: 772
Joined: Fri Sep 05, 2008 2:59 am
Location: Boston, MA
Xfire Name: WMA9000

Re: gg_winner_display

Postby BucKeT » Sun Aug 02, 2009 8:22 pm

oooops, "http://thebucketsplace.com/gg5_win.php" I left out the slash. This still does not work so I'm still missing something :(
Wear short sleeves "Support the right to bear arms"
BucKeT

Private
Private
User avatar
 
Posts: 40
Joined: Thu Dec 04, 2008 1:44 am
Location: Florida
Steam Friends Name: lomm_razz

Postby Warren » Mon Aug 03, 2009 12:05 am

Go to the link you are setting it to:

http://thebucketsplace.com/gg5_win.php

There is nothing there.
Warren

Site Admin
Site Admin
 
Posts: 772
Joined: Fri Sep 05, 2008 2:59 am
Location: Boston, MA
Xfire Name: WMA9000

gg_winner_display FTW

Postby MasterKill » Sun Oct 18, 2009 7:07 pm

Image

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

Recruit
Recruit
User avatar
 
Posts: 4
Joined: Sun Oct 18, 2009 11:26 am
Steam Friends Name: masterkill9
Xfire Name: masterkill9

Re: gg_winner_display

Postby WebJunkie » Sun Nov 01, 2009 4:05 pm

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.
WebJunkie

Private
Private
 
Posts: 19
Joined: Thu Dec 04, 2008 4:17 am
Steam Friends Name: WebJunkie

Re: gg_winner_display

Postby Warren » Tue Nov 03, 2009 6:51 pm

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.
Warren

Site Admin
Site Admin
 
Posts: 772
Joined: Fri Sep 05, 2008 2:59 am
Location: Boston, MA
Xfire Name: WMA9000

Re: gg_winner_display

Postby danfocus » Tue Mar 02, 2010 7:04 am

Maybe better use
<?php print (htmlspecialchars($_GET["winnerName"])); ?>

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

Recruit
Recruit
 
Posts: 1
Joined: Tue Mar 02, 2010 7:01 am

Postby metalfa_n1 » Fri Mar 05, 2010 12:54 pm

Is there any way to show/add the winner name at hostname?

For example:

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

Recruit
Recruit
 
Posts: 2
Joined: Fri Feb 26, 2010 12:26 pm

Re:

Postby Warren » Fri Mar 05, 2010 8:55 pm

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))
Warren

Site Admin
Site Admin
 
Posts: 772
Joined: Fri Sep 05, 2008 2:59 am
Location: Boston, MA
Xfire Name: WMA9000

Re: gg_winner_display

Postby candyland » Sun Mar 28, 2010 10:40 pm

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>
candyland

Recruit
Recruit
 
Posts: 3
Joined: Sun Mar 28, 2010 10:35 pm

Previous


Return to Downloads

Who is online

Users browsing this forum: No registered users and 17 guests

cron