Wer ist hier? 1 Gäste
|
Score System in Infusion einbauen
|
|
| Schrank |
Geschrieben am 16.05.2010 00000005 16:07
|
|
Jung Mitglied ![]() Beiträge: 38 Registriert am: 27.09.08 Fusioneer: 17 years 1 months 3 weeks 24 days 22 hours 22 minutes 23 seconds |
Hallo, ich habe ein Problem. Ich habe ein so genanntes Diebspiel für PHP-Fusion. Nun möchte ich das man nicht nur einen Punkt im Diebspiel bekommt, sondern auch einen Score. Ich habe es nun sehr lange probiert, bekomme es aber leider nicht hin. Ich habe hier unten nun die Datei angehängt, auf der der Gast landet. Dort wird er dann "bestohlen". Nun müsste der Dieb nur noch einen Score bekommen und alles wäre gut. :) Wäre super wenn mir damit jemand helfen könnte. [geshi=php]<?php require_once('include/go.php'); if(!isset($_GET['uid']) || !isNum($_GET['uid'])) { fallback('index.php'); } if(iMEMBER && $userdata['user_id']==$_GET['uid']) { fallback('my.php'); } // get php-fusion user $res = dbquery("SELECT user_id, user_name FROM ".DB_USERS." WHERE user_id=".$_GET['uid']." AND user_status=0"); if(!dbrows($res)) { fallback('index.php'); } $user = dbarray($res); // check ip-reload $res = dbquery("SELECT victim_ip, user_id FROM ".AWSI_DB_VICTIMS." WHERE victim_ip='".USER_IP."' AND user_id=".$user['user_id']." AND created_at>=".(time()-$awsi_settings['reload'])); if(dbrows($res)) { fallback('index.php'); } else { dbquery("REPLACE INTO ".AWSI_DB_VICTIMS." SET victim_ip='".USER_IP."', user_id='".$user['user_id']."', created_at='".time()."'"); } // how many points to steal? if($awsi_settings['points_per_steal']>1) { $points = rand(1, $awsi_settings['points_per_steal']); } else { $points = $awsi_settings['points_per_steal']; } // get steal-it user $res = dbquery("SELECT user_id FROM ".AWSI_DB_USERS." WHERE user_id=".$user['user_id']); if(dbrows($res)) { $row = dbarray($res); dbquery("UPDATE ".AWSI_DB_USERS." SET steal_counts=steal_counts+1, steal_points=steal_points+".$points." WHERE user_id=".$user['user_id']); dbquery("UPDATE ".AWSI_DB_STEAL_DAYS." SET steal_counts=steal_counts+1, steal_points=steal_points+".$points." WHERE user_id=".$user['user_id']." AND steal_day=CURDATE()"); if(mysql_affected_rows()==0) { dbquery("INSERT INTO ".AWSI_DB_STEAL_DAYS." SET steal_counts=1, steal_points=".$points.", user_id=".$user['user_id'].", steal_day=CURDATE()"); } } else { dbquery("INSERT INTO ".AWSI_DB_USERS." SET user_id=".$user['user_id'].", steal_counts=1, steal_points=".$points); dbquery("INSERT INTO ".AWSI_DB_STEAL_DAYS." SET user_id=".$user['user_id'].", steal_day=CURDATE(), steal_counts=1, steal_points=".$points); } /**************************************************************************** * GUI */ opentable($locale['awsi_index']); awsi_menu(); echo sprintf($locale['awsi_stolen'], $user['user_name'], $user['user_name']); closetable(); require_once('include/die.php'); ?>[/geshi] |
|
|
|
| SC-Ad-Bot | Advertisement |
| |
| emblinux |
Geschrieben am 16.05.2010 00000005 16:13
|
|
Seiten Administrator ![]() Beiträge: 3813 Registriert am: 04.10.08 Fusioneer: 17 years 1 months 2 weeks 17 days 8 hours 29 minutes 34 seconds |
Schau dir dazu einfach mal den Thread mit dem geldgame an, dort habe ich dazu bereits was geschrieben. Ergo, einfach mal die Suche benutzen.
|
|
|
|
| Springe ins Forum: |
Ähnliche Themen
| Thema | Forum | Antworten | Letzter Beitrag |
|---|---|---|---|
| Score System unter PHP-Fusion 7.02.07 | Infusionen | 16 | 07.08.2019 00000008 14:09 |
| MWN Geschenke System -Geschenke löschen! | Infusionen | 23 | 01.06.2019 00000006 22:52 |
| [SUCHE] Kartensammelalbum Infusion | Infusionen | 2 | 29.12.2018 00000012 06:55 |
| Lotto System BUG | Infusionen | 10 | 06.08.2018 00000008 16:41 |
| Hilfe MWN Geschenke System fehler | Infusionen | 2 | 27.12.2016 00000012 20:11 |
Austria
Czech Republic
Germany
Denmark
Spain
France
Iran
Lithuania
Norway
Poland
Romania
Russia
Sweden
Slovakia
Turkey
United States
United Kingdom











