Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[Release] Room On Register
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="JayC" data-source="post: 381606" data-attributes="member: 36373"><p>Another version added:</p><p></p><p>[CODE]DROP TABLE IF EXISTS `room_starters`;</p><p>CREATE TABLE `room_starters` (</p><p> `id` int(11) unsigned NOT NULL AUTO_INCREMENT,</p><p> PRIMARY KEY (`id`)</p><p>) ENGINE=InnoDB DEFAULT CHARSET=utf8;</p><p></p><p><?php</p><p>$randomRoomID = mysql_fetch_assoc(mysql_query("SELECT `id` FROM room_starters ORDER BY RAND() LIMIT 1"));</p><p></p><p>$getRoom = mysql_fetch_assoc(mysql_query("SELECT * FROM `rooms` WHERE id = '".$randomRoomID['id']."' LIMIT 1"));</p><p></p><p>$starterCaption = "Welcome " + $_SESSION['user']['username'];</p><p>mysql_query("INSERT INTO `rooms` (roomtype, caption, owner, description, model_name, wallpaper, floor, wallthick, floorthick, allow_hidewall) VALUES ('public','".$starterCaption."','".$_SESSION['user']['id']."','Welcome to iHabbo','".$getRoom['model_name']."','".$getRoom['wallpaper']."','".$getRoom['floor']."','".$getRoom['wallthick']."','".$getRoom['floorthick']."','".$getRoom['allow_hidewall']."'));</p><p>$lastRoomID = mysql_fetch_assoc(mysql_query("SELECT id FROM rooms ORDER BY `id` DESC LIMIT 1"));</p><p>$getItems = mysql_query("SELECT * FROM `items` WHERE room_id = '".$randomRoomID['id']."'");</p><p></p><p>while($CurItem = mysql_fetch_assoc($getItems)){</p><p> mysql_query("INSERT INTO `items` (user_id, room_id, base_item, extra_data, x, y, z, rot, wall_pos) VALUES ('".$_SESSION['user']['id']."','".$lastRoomID['id']."','".$getItems['base_item']."','".$getItems['extra_data']."','".$getItems['x']."','".$getItems['y']."','".$getItems['z']."','".$getItems['rot']."','".$getItems['wall_pos']."')");</p><p>}</p><p></p><p>?>[/CODE]</p><p>Add the table, put the room ID into the table, put the php code into the client and it will just grab directly from the room!</p></blockquote><p></p>
[QUOTE="JayC, post: 381606, member: 36373"] Another version added: [CODE]DROP TABLE IF EXISTS `room_starters`; CREATE TABLE `room_starters` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; <?php $randomRoomID = mysql_fetch_assoc(mysql_query("SELECT `id` FROM room_starters ORDER BY RAND() LIMIT 1")); $getRoom = mysql_fetch_assoc(mysql_query("SELECT * FROM `rooms` WHERE id = '".$randomRoomID['id']."' LIMIT 1")); $starterCaption = "Welcome " + $_SESSION['user']['username']; mysql_query("INSERT INTO `rooms` (roomtype, caption, owner, description, model_name, wallpaper, floor, wallthick, floorthick, allow_hidewall) VALUES ('public','".$starterCaption."','".$_SESSION['user']['id']."','Welcome to iHabbo','".$getRoom['model_name']."','".$getRoom['wallpaper']."','".$getRoom['floor']."','".$getRoom['wallthick']."','".$getRoom['floorthick']."','".$getRoom['allow_hidewall']."')); $lastRoomID = mysql_fetch_assoc(mysql_query("SELECT id FROM rooms ORDER BY `id` DESC LIMIT 1")); $getItems = mysql_query("SELECT * FROM `items` WHERE room_id = '".$randomRoomID['id']."'"); while($CurItem = mysql_fetch_assoc($getItems)){ mysql_query("INSERT INTO `items` (user_id, room_id, base_item, extra_data, x, y, z, rot, wall_pos) VALUES ('".$_SESSION['user']['id']."','".$lastRoomID['id']."','".$getItems['base_item']."','".$getItems['extra_data']."','".$getItems['x']."','".$getItems['y']."','".$getItems['z']."','".$getItems['rot']."','".$getItems['wall_pos']."')"); } ?>[/CODE] Add the table, put the room ID into the table, put the php code into the client and it will just grab directly from the room! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[Release] Room On Register
Top