[RP] Wanted Page! + COMMANDS [EDITED] [SLEDMORE]
Hey guys,
Its me again, Well a friend of mine (Him.) Made an RP server, and he had an page for wanted users that was buggy, and didnt fully work, and i said want me to make a new one? so its not like the top stats, and it goes by if they're wanted!
So he said sure, but i'm also going to release this to you ragezoners!
Right the commands work in away to send messages to cops on who has been added and has been removed! Also, the new arrest command is there to remove the users wanted status! -EDIT- It now says who added them to the list!
NEW: ADDED COMMANDS!!
Right,
SQL:
Goto the users table, add a new collum called "wanted" (with no quotation marks) with the values, init 1 default 0!
C# (COMMANDS)
:addwanted username command!
PHP Code:
#region :addwanted <user>
case "addwanted":
{
virtualUser User = userManager.getUser(args[1]);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
int isworking = dbClient.getInt("SELECT working FROM users WHERE name = '" + _Username + "'");
if (isworking == 1)
{
{
int me_secure_id = dbClient.getInt("SELECT secure_id FROM users WHERE name = '" + _Username + "'");
int canarrest = dbClient.getInt("SELECT arrest FROM jobs_ranks WHERE id = '" + me_secure_id + "'");
if (canarrest == 1)
{
Room.sendSaying(roomUser, "*Adds " + User._Username + ", to the wanted list!*");
dbClient.runQuery("UPDATE users SET wanted = '1' WHERE name = '" + User._Username + "'");
userManager.sendToCop(1, false, "BK" + "" + User._Username + " has been added to the wanted list by " + _Username + "!");
}
}
}
}
break;
}
#endregion
:removewanted username command
PHP Code:
#region :removewanted <user>
case "removewanted":
{
virtualUser User = userManager.getUser(args[1]);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
int isworking = dbClient.getInt("SELECT working FROM users WHERE name = '" + _Username + "'");
if (isworking == 1)
{
{
int me_secure_id = dbClient.getInt("SELECT secure_id FROM users WHERE name = '" + _Username + "'");
int canarrest = dbClient.getInt("SELECT arrest FROM jobs_ranks WHERE id = '" + me_secure_id + "'");
if (canarrest == 1)
{
Room.sendSaying(roomUser, "*Removes " + User._Username + ", from the wanted list!*");
dbClient.runQuery("UPDATE users SET wanted = '0' WHERE name = '" + User._Username + "'");
userManager.sendToCop(1, false, "BK" + "" + User._Username + " has been removed from the wanted list by " + _Username + "!");
}
}
}
}
break;
}
#endregion
:arrest user time command
this file was edited to remove their wanted stats when arrested!
PHP Code:
#region :arrest <user> <time>
case "arrest":
{
virtualUser User = userManager.getUser(args[1]);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
int isworking = dbClient.getInt("SELECT working FROM users WHERE name = '" + _Username + "'");
if (isworking == 1)
{
{
int me_secure_id = dbClient.getInt("SELECT secure_id FROM users WHERE name = '" + _Username + "'");
int canarrest = dbClient.getInt("SELECT arrest FROM jobs_ranks WHERE id = '" + me_secure_id + "'");
if (User._roomID == _roomID && (roomUser.Y == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y + 1 == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y - 1 == User.roomUser.Y && roomUser.X == User.roomUser.X) || (roomUser.Y == User.roomUser.Y && roomUser.X + 1 == User.roomUser.X) || (roomUser.Y == User.roomUser.Y && roomUser.X - 1 == User.roomUser.X))
{
if (canarrest == 1)
{
if (User.roomUser.walkLock == false)
{
Room.sendSaying(roomUser, "*attempts to arrest " + User._Username + ", but notices that he is not cuffed*");
}
else
{
int time = int.Parse(args[2]);
if (time > 60 || time < 1)
{
sendData("BK" + "What exactly are you trying to do?");
}
else
{
dbClient.runQuery("UPDATE users SET arrested = '1', wanted = '0' arrests = arrests + '1', time_jail = '" + args[2] + "' WHERE name = '" + User._Username + "'");
int fine = time * 5;
dbClient.runQuery("UPDATE users SET credits = credits - '" + fine + "' WHERE name = '" + User._Username + "'");
refreshValueables(true, false);
Room.sendSaying(roomUser, "*arrests " + User._Username + " for " + time + " minutes, and fines them " + fine + " credits*");
User.sendData("D^" + "H" + Encoding.encodeVL64(112));
User.sendData("BK" + "You have been arrested by " + _Username + ", and fined " + fine + " credits!");
ThreadStart jailStarter = new ThreadStart(User.jailTime);
User.jailLooper = new Thread(jailStarter);
User.jailLooper.Priority = ThreadPriority.Lowest;
User.jailLooper.Start();
}
}
}
}
}
}
}
break;
}
#endregion
PHP:
PHP Code:
<?php
/*================================================================+\
|| # PHPRetro - An extendable virtual hotel site and management
|+==================================================================
|| # Copyright (C) 2009 Yifan Lu. All rights reserved.
|| # http://www.yifanlu.com
|| # Parts Copyright (C) 2009 Meth0d. All rights reserved.
|| # http://www.meth0d.org
|| # All images, scripts, and layouts
|| # Copyright (C) 2009 Sulake Ltd. All rights reserved.
|+==================================================================
|| # PHPRetro is provided "as is" and comes without
|| # warrenty of any kind. PHPRetro is free software!
|| # License: GNU Public License 3.0
|| # http://opensource.org/licenses/gpl-license.php
\+================================================================*/
$page['allow_guests'] = true;
require_once('./includes/core.php');
require_once('./includes/session.php');
$data = new community_sql;
$lang->addLocale("community.community");
$page['id'] = "wantedusers";
$page['name'] = "Wanted users";
$page['bodyid'] = "home";
$page['cat'] = "community";
require_once('./templates/community_header.php');
?>
<div id="container">
<div id="content" style="position: relative" class="clearfix">
<div id="column1" class="column">
<div class="habblet-container ">
<div class="cbb clearfix green ">
<h2 class="title">Wanted Users!</h2>
<div id="notfound-content" class="box-content">
<table width="100%">
Below you will see who has been noted as wanted which means they basically need to be arrested!<br /><br />
<?php
$sql = "SELECT name,wanted,figure,sex,id FROM users WHERE wanted = 1 ORDER BY name DESC";
$result = mysql_query($sql) OR die(mysql_error());
if(mysql_num_rows($result)) {
while($row = mysql_fetch_assoc($result)) {
$userid = $row['id'];
if($row['wanted'] == "1")
{
}
{
$s_username = $row['name'];
$s_figure = 'http://www.habbo.co.uk/habbo-imaging/avatarimage?figure='.$row['figure'].'&size=b&direction=2&head_direction=3&gesture=sml&size=m';
}
echo "<p><img src='".$s_figure."' alt='".$s_username."' align='left' />
<b><a href='home/".$s_username."'>".$s_username."</a></b><br /><br /><br /><br /><br /><br /><br /><br /></p>";
}
}else{
echo 'No one is yet wanted by the NYPD!</a>';
}
?>
</table>
</div>
</div>
</div></div>
<div class="habblet-container ">
</div>
<div id="column2" class="column">
<div class="habblet-container ">
<div class="cbb clearfix green ">
<h2 class="title">Whats this page? </h2>
<div id="notfound-looking-for" class="box-content">
<table width="170px">
This page is to show you who is wanted for being arrested! <br /><br />So look out!
</table>
</div>
</div>
</div></div>
<?php require_once('templates/community_footer.php'); ?>
Screenshots:
http://img21.imageshack.us/img21/8012/nooneiswanted.png
http://img444.imageshack.us/img444/7066/wantedusers.png
Cheers, if you like this, click the thanks button!
Re: [RP] Wanted Page! [SLEDMORE]
Re: [RP] Wanted Page! [SLEDMORE]
Quote:
Originally Posted by
Him.
put a "<" at the start?
On what?
Also guys! Updated, added :removewanted and :addwanted they also send notifications to the police!
And added an arrest command that will remove their wanted stats!
Re: [RP] Wanted Page! + COMMANDS [EDITED] [SLEDMORE]
Eh take that back x] Good Release
He made this for meh |
Re: [RP] Wanted Page! + COMMANDS [EDITED] [SLEDMORE]
Quote:
Originally Posted by
Him.
Eh take that back x] Good Release
He made this for meh |
Ya got that right :').
Re: [RP] Wanted Page! + COMMANDS [EDITED] [SLEDMORE]
You should add who they were reported by and what amount of time they should be arrested for if found.
Re: [RP] Wanted Page! + COMMANDS [EDITED] [SLEDMORE]
Quote:
Originally Posted by
RastaLulz
You should add who they were reported by and what amount of time they should be arrested for if found.
Done the who by mr rastaa! Il let teh public finish the rest.
Re: [RP] Wanted Page! + COMMANDS [EDITED] [SLEDMORE]
This is, as usual mate, a fantastic release.
Will be using for Olympus definitely =)
Re: [RP] Wanted Page! + COMMANDS [EDITED] [SLEDMORE]
Nice release!! I'll use for sure :)
Re: [RP] Wanted Page! + COMMANDS [EDITED] [SLEDMORE]
Re: [RP] Wanted Page! + COMMANDS [EDITED] [SLEDMORE]
Nice release man! I'm sure many will find a use for it.
Re: [RP] Wanted Page! + COMMANDS [EDITED] [SLEDMORE]
Would you be able to convert the code into a vista4life version as i notice this is for Tdp
Re: [RP] Wanted Page! + COMMANDS [EDITED] [SLEDMORE]
Very nice.
Good work.
Thanks.
Really gonna use this.
Very very nice!
10/10
Yippi!!
Lol
Noob reply
Or it is genius.
Re: [RP] Wanted Page! + COMMANDS [EDITED] [SLEDMORE]
Quote:
Originally Posted by
Mayes
This is, as usual mate, a fantastic release.
Will be using for Olympus definitely =)
Thanks buddy! :')
Quote:
Originally Posted by
Bjork
Nice release!! I'll use for sure :)
Glad you like it ;'D!
Quote:
Originally Posted by
swimoTheBig
Well done craig :)
Cheers Simon :')
Quote:
Originally Posted by
Inked
Nice release man! I'm sure many will find a use for it.
Quote:
Originally Posted by
micksta35
Would you be able to convert the code into a vista4life version as i notice this is for Tdp
Ahhahh Probably, i prefer coding in NON tdbp.
Quote:
Originally Posted by
KingStupid
Very nice.
Good work.
Thanks.
Really gonna use this.
Very very nice!
10/10
Yippi!!
Lol
Noob reply
Or it is genius.
Thanks mate ;'D!
Re: [RP] Wanted Page! + COMMANDS [EDITED] [SLEDMORE]
Good release craig once again :D 10/10