stock CreateFraktionTabelle()
{
new query[1024];
format(query, sizeof(query), "CREATE TABLE IF NOT EXISTS `"SQL_DTAG"fraktionen` (");
format(query, sizeof(query), "%s `ID` int(11) NOT NULL,", query);
format(query, sizeof(query), "%s `Kasse` int(11) NOT NULL,", query);
format(query, sizeof(query), "%s `SafeWaffenteile` int(11) NOT NULL,", query);
format(query, sizeof(query), "%s `SafeDrogen` int(11) NOT NULL,", query);
format(query, sizeof(query), "%s `SafeSpice` int(11) NOT NULL,", query);
format(query, sizeof(query), "%s `Rang0` varchar(32) NOT NULL,", query);
format(query, sizeof(query), "%s `Rang1` varchar(32) NOT NULL,", query);
format(query, sizeof(query), "%s `Rang2` varchar(32) NOT NULL,", query);
format(query, sizeof(query), "%s `Rang3` varchar(32) NOT NULL,", query);
format(query, sizeof(query), "%s `Rang4` varchar(32) NOT NULL,", query);
format(query, sizeof(query), "%s `Rang5` varchar(32) NOT NULL,", query);
format(query, sizeof(query), "%s `Rang6` varchar(32) NOT NULL,", query);
format(query, sizeof(query), "%s `Member` int(11) NOT NULL,", query);
format(query, sizeof(query), "%s `MaxMember` int(11) NOT NULL", query);
format(query, sizeof(query), "%s) ENGINE=InnoDB DEFAULT CHARSET=latin1;", query);
mysql_pquery(handle, query);
CreateFraktionData();
return 1;
}
stock CreateFraktionData()
{
new query[2048];
format(query, sizeof(query), "INSERT INTO `"SQL_DTAG"fraktionen` (`ID`, `Kasse`, `SafeWaffenteile`, `SafeDrogen`, `SafeSpice`, `Rang0`, `Rang1`, `Rang2`, `Rang3`, `Rang4`, `Rang5`, `Rang6`, `Member`, `MaxMember`) VALUES");
format(query, sizeof(query), "%s (0, 0, 0, 0, 0, '', '', '', '', '', '', '', 0, 1000000),", query);
format(query, sizeof(query), "%s (1, 1000000, 0, 0, 0, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'CoLeader', 'Leader', 0, 12),", query);
format(query, sizeof(query), "%s (2, 1000000, 0, 0, 0, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'CoLeader', 'Leader', 0, 12),", query);
format(query, sizeof(query), "%s (3, 1000000, 0, 0, 0, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'Vize Präsident', 'Präsident', 0, 12),", query);
format(query, sizeof(query), "%s (4, 1000000, 0, 0, 0, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'Arzt', 'Oberarzt', 0, 12),", query);
format(query, sizeof(query), "%s (5, 1000000, 0, 0, 0, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'CoLeader', 'Leader', 0, 12),", query);
format(query, sizeof(query), "%s (6, 1000000, 0, 0, 0, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'CoLeader', 'Leader', 0, 12),", query);
format(query, sizeof(query), "%s (7, 500000, 20000, 500, 1000, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'CoLeader', 'Leader', 0, 12),", query);
format(query, sizeof(query), "%s (8, 500000, 20000, 500, 1000, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'CoLeader', 'Leader', 0, 12),", query);
format(query, sizeof(query), "%s (9, 500000, 20000, 500, 1000, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'CoLeader', 'Leader', 0, 12),", query);
format(query, sizeof(query), "%s (10, 500000, 20000, 500, 1000, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'CoLeader', 'Leader', 0, 12),", query);
format(query, sizeof(query), "%s (11, 500000, 20000, 500, 1000, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'CoLeader', 'Leader', 0, 12),", query);
format(query, sizeof(query), "%s (12, 500000, 20000, 500, 1000, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'CoLeader', 'Leader', 0, 12),", query);
format(query, sizeof(query), "%s (13, 500000, 20000, 500, 1000, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'CoLeader', 'Leader', 0, 12),", query);
format(query, sizeof(query), "%s (14, 500000, 20000, 500, 1000, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'CoLeader', 'Leader', 0, 12),", query);
format(query, sizeof(query), "%s (15, 500000, 20000, 500, 1000, 'Rang0', 'Rang1', 'Rang2', 'Rang3', 'Ausbilder', 'CoLeader', 'Leader', 0, 12);", query);
mysql_pquery(handle, query);
}
Alles anzeigen