
DROP TABLE IF EXISTS `gmadmin_sessions`;

CREATE TABLE `gmadmin_sessions` (
  `userid` int(11) NOT NULL,
  `sessionid` text NOT NULL,
  `access` int(11) NOT NULL default '0',
  `last_action` bigint(20) NOT NULL default '0',
  PRIMARY KEY  (`sessionid`(25))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



DROP TABLE IF EXISTS `gmp_users`;

CREATE TABLE `gmp_users` (
  `steamid` varchar(45) NOT NULL,
  `stars` int(3) NOT NULL,
  `models` varchar(50) default NULL,
  `songs` varchar(50) default NULL,
  PRIMARY KEY  (`steamid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



DROP TABLE IF EXISTS `gmr2_records`;

CREATE TABLE `gmr2_records` (
  `map` text NOT NULL,
  `name` text NOT NULL,
  `time` float NOT NULL,
  `steamid` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



DROP TABLE IF EXISTS `gmr2_users`;

CREATE TABLE `gmr2_users` (
  `steamid` text NOT NULL,
  `rank` int(11) NOT NULL default '1000',
  `points` int(11) NOT NULL default '0',
  `money` int(11) NOT NULL default '1000',
  `vehicles` text NOT NULL,
  `vehicle_selected` text NOT NULL,
  `time_played` int(11) NOT NULL default '0',
  `achievements` text NOT NULL,
  `lifetime_wins` int(11) NOT NULL default '0',
  `lifetime_races` int(11) NOT NULL default '0',
  `lifetime_records` int(11) NOT NULL default '0',
  `week_wins` int(11) NOT NULL default '0',
  `week_races` int(11) NOT NULL default '0',
  `hat_equipped` int(11) NOT NULL default '0',
  `trinkets_owned` text NOT NULL,
  `records` text NOT NULL,
  PRIMARY KEY  (`steamid`(20))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


DROP TABLE IF EXISTS `ip_intel`;

CREATE TABLE `ip_intel` (
  `steamid` text NOT NULL,
  `ip` text,
  `name` text,
  `first_seen` bigint(20) default '0',
  `last_seen` bigint(20) default '0',
  `num_seen` int(11) default '0',
  `unique_id` text,
  `rp_name` text,
  `play_time` bigint(20) default '0',
  `strikes` int(11) default '0',
  PRIMARY KEY  (`steamid`(20))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



DROP TABLE IF EXISTS `jailbreak`;

CREATE TABLE `jailbreak` (
  `id` text,
  `admin` text,
  `entered_time` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

/*Table structure for table `pending_users` */

DROP TABLE IF EXISTS `pending_users`;

CREATE TABLE `pending_users` (
  `id` int(11) NOT NULL auto_increment,
  `username` varchar(200) NOT NULL,
  `password` varchar(200) NOT NULL,
  `steamid` varchar(200) NOT NULL,
  `ipaddress` varchar(200) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



DROP TABLE IF EXISTS `perp_admintime_log`;

CREATE TABLE `perp_admintime_log` (
  `steamid` varchar(45) NOT NULL,
  `nick` varchar(45) NOT NULL,
  `date` varchar(15) NOT NULL,
  `length` int(11) NOT NULL,
  `Server` smallint(6) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



DROP TABLE IF EXISTS `perp_bname`;

CREATE TABLE `perp_bname` (
  `name` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


DROP TABLE IF EXISTS `perp_fuel`;

CREATE TABLE `perp_fuel` (
  `uid` int(11) NOT NULL,
  `1` int(11) NOT NULL default '10000',
  `2` int(11) NOT NULL default '10000',
  `3` int(11) NOT NULL default '10000',
  `4` int(11) NOT NULL default '10000',
  `5` int(11) NOT NULL default '10000',
  `6` int(11) NOT NULL default '10000',
  `7` int(11) NOT NULL default '10000',
  `8` int(11) NOT NULL default '10000',
  `9` int(11) NOT NULL default '10000',
  `10` int(11) NOT NULL default '10000',
  `11` int(11) NOT NULL default '10000',
  `12` int(11) NOT NULL default '10000',
  `13` int(11) NOT NULL default '10000',
  `14` int(11) NOT NULL default '10000',
  `15` int(11) NOT NULL default '10000',
  `16` int(11) NOT NULL default '10000',
  `17` int(11) NOT NULL default '10000',
  `18` int(11) NOT NULL default '10000',
  `19` int(11) NOT NULL default '10000',
  `20` int(11) NOT NULL default '10000',
  `21` int(11) NOT NULL default '10000',
  `22` int(11) NOT NULL default '10000',
  `23` int(11) NOT NULL default '10000',
  `24` int(11) NOT NULL default '10000',
  `25` int(11) NOT NULL default '10000',
  `26` int(11) NOT NULL default '10000',
  `27` int(11) NOT NULL default '10000',
  `28` int(11) NOT NULL default '10000',
  `29` int(11) NOT NULL default '10000',
  `30` int(11) NOT NULL default '10000',
  `31` int(11) NOT NULL default '10000',
  `32` int(11) NOT NULL default '10000',
  `33` int(11) NOT NULL default '10000',
  `34` int(11) NOT NULL default '10000',
  `35` int(11) NOT NULL default '10000',
  `36` int(11) NOT NULL default '10000',
  `37` int(11) NOT NULL default '10000',
  `38` int(11) NOT NULL default '10000',
  `39` int(11) NOT NULL default '10000',
  `40` int(11) NOT NULL default '10000',
  `41` int(11) NOT NULL default '10000',
  `42` int(11) NOT NULL default '10000',
  `43` int(11) NOT NULL default '10000',
  `44` int(11) NOT NULL default '10000',
  `45` int(11) NOT NULL default '10000',
  `46` int(11) NOT NULL default '10000',
  `47` int(11) NOT NULL default '10000',
  `48` int(11) NOT NULL default '10000',
  `49` int(11) NOT NULL default '10000',
  `50` int(11) NOT NULL default '10000',
  `51` int(11) NOT NULL default '10000',
  `52` int(11) NOT NULL default '10000',
  `53` int(11) NOT NULL default '10000',
  `54` int(11) NOT NULL default '10000',
  `55` int(11) NOT NULL default '10000',
  PRIMARY KEY  (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `perp_organization`;

CREATE TABLE `perp_organization` (
  `name` text NOT NULL,
  `motd` text NOT NULL,
  `owner` text NOT NULL,
  `id` int(11) NOT NULL auto_increment,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=229 DEFAULT CHARSET=latin1;


DROP TABLE IF EXISTS `perp_system`;

CREATE TABLE `perp_system` (
  `key` text NOT NULL,
  `value` text NOT NULL,
  PRIMARY KEY  (`key`(15))
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `perp_users`;

CREATE TABLE `perp_users` (
  `uid` bigint(11) NOT NULL,
  `id` text NOT NULL,
  `steamid` text NOT NULL,
  `blacklists` text NOT NULL,
  `rp_name_first` text NOT NULL,
  `rp_name_last` text NOT NULL,
  `time_played` bigint(20) NOT NULL,
  `cash` bigint(20) NOT NULL,
  `model` text NOT NULL,
  `items` text NOT NULL,
  `skills` text NOT NULL,
  `genes` text NOT NULL,
  `formulas` text NOT NULL,
  `organization` int(11) NOT NULL default '0',
  `bank` bigint(20) NOT NULL,
  `vehicles` text NOT NULL,
  `ringtones` text NOT NULL,
  `ammo_pistol` int(11) unsigned zerofill NOT NULL default '00000000000',
  `ammo_rifle` int(11) unsigned zerofill NOT NULL default '00000000000',
  `ammo_shotgun` int(11) unsigned zerofill NOT NULL default '00000000000',
  `ringtone` int(11) NOT NULL default '1',
  `last_played` text NOT NULL,
  `fuelleft` int(11) NOT NULL default '10000',
  `lastcar` text NOT NULL,
  PRIMARY KEY  (`uid`,`id`(15),`steamid`(15))
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `server_bans`;

CREATE TABLE `server_bans` (
  `steamid` text NOT NULL,
  `unban_time` bigint(20) NOT NULL,
  `banner_name` text NOT NULL,
  `reason` text NOT NULL,
  `banned_name` text NOT NULL,
  PRIMARY KEY  (`steamid`(20))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


DROP TABLE IF EXISTS `server_bans_logs`;

CREATE TABLE `server_bans_logs` (
  `id` int(11) NOT NULL auto_increment,
  `steamid` varchar(20) NOT NULL,
  `type` text NOT NULL,
  `committed_by` text NOT NULL,
  `reason` text NOT NULL,
  `date` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=908 DEFAULT CHARSET=latin1;



DROP TABLE IF EXISTS `server_bans_points`;

CREATE TABLE `server_bans_points` (
  `id` int(11) NOT NULL auto_increment,
  `steamid` text NOT NULL,
  `time` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=220 DEFAULT CHARSET=latin1;