stock SavePlayerData(playerid)
{
new query[512];
mysql_format(mysql, query, sizeof(query), "UPDATE `Spieler` SET `IP`=%i, `Admin`=%i, `Kills`=%i, `Deaths`=%i, `Geld`=%i, `Personalausweis`=%i, `Persotimer`=%i, `Ptimerstart`=%i WHERE `ID`=%i",\
IP[playerid], pData[playerid][Admin], pData[playerid][Kills], pData[playerid][Deaths], pData[playerid][Money], pData[playerid][Personalausweis], pData[playerid][Persotimer], pData[playerid][Ptimerstart], pData[playerid][ID]);
mysql_tquery(mysql, query, "", "");
}
pData[playerid][ID] = cache_insert_id();
pData[playerid][Admin] = cache_get_field_content_int(0, "Admin");
pData[playerid][Money] = cache_get_field_content_int(0, "Geld");
pData[playerid][Kills] = cache_get_field_content_int(0,"Kills");
pData[playerid][Deaths] = cache_get_field_content_int(0, "Deaths");
pData[playerid][Personalausweis] = cache_get_field_content_int(0, "Personalausweis");
pData[playerid][Persotimer] = cache_get_field_content_int(0, "Persotimer");
pData[playerid][Ptimerstart] = cache_get_field_content_int(0, "Ptimerstart");
DBSQL
-- Tabellenstruktur für Tabelle `Spieler`
--
CREATE TABLE IF NOT EXISTS `Spieler` (
`ID` int(10) NOT NULL AUTO_INCREMENT,
`Nutzername` varchar(24) NOT NULL,
`Passwort` varchar(129) NOT NULL,
`IP` varchar(16) NOT NULL,
`Admin` int(10) NOT NULL,
`Kills` int(10) NOT NULL,
`Deaths` int(10) NOT NULL,
`Geld` int(10) NOT NULL,
`Personalausweis` int(10) DEFAULT '0',
`Persotimer` int(60) DEFAULT '60',
`Ptimerstart` int(11) DEFAULT '0',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
Alles anzeigen