PDA

View Full Version : i need a script look here for deatails


sytodave88
07-21-2005, 09:41 AM
i am looking for a script that gives a user a certian amount of money(dummy money)for a rpg online game when he/she signs up similer to
www.themafianetwork.net

and a script that bans users and mod kills them

i someone could do this i would really help me

JamieR
07-21-2005, 09:48 AM
That'd be a custom job I think which you would have to pay someone to do. I don't think there are any around free on the internet.

delinear
07-21-2005, 09:50 AM
We'd need to know more about your existing script and how it works in order to decide the best way to implement these options. Otherwise we can only speak in generalities which might not fit what you want.

Essentially, though, you'd just update the money field in the database on signup with the new amount of money, or just add the money in the initial insert query that creates the user.

As for banning, probably the best way would be by email - remove the user from the database and add their email address to a banned list which is checked every time someone signs up. Everything else is too unreliable, IP's change and can result in innocent users being banned if they're on a shared IP, cookies can be altered, etc. Of course, it's easy to create new email addresses, too, but there's not a lot you can do about that :o

JamieR
07-21-2005, 09:55 AM
Some games and websites ban a lot of the free webmail addresses - hotmail etc as you can sometimes get a lot of people opening new accounts one after another to spam online games and forums etc.

sytodave88
07-21-2005, 10:12 AM
i don't have an exsting script i am starting from scratch all i need is that when he user logs in he has some money to start off with and what about the script that can mod kill them

Fou-Lu
07-21-2005, 11:56 AM
This sounds like a forum addition am I correct?
(My first php project was one like this :), though that was a long time ago now.)

Now, if this is an addon to an existing software, this makes for a simple task. If its a complete from scratch item, you now have a paid work in order, as to do these simple things you would need to create a CMS based system of some sorts, or at least a login system for it.
Can you be more specific as to what you actually have? If its a port, please tell us what system its being ported into, as well as its version. If its a from scratch currently on the drawing board project, I'd love to help but ATM I cannot donate that kind of time...

sytodave88
07-21-2005, 01:06 PM
niver mind about this reply

bathurst_guy
07-21-2005, 01:18 PM
cant u just add an extra value in your db for each user and when they register set it to 10 and have it changed depending on when they "spend it"

sytodave88
07-21-2005, 01:40 PM
i don't know what you mean

delinear
07-21-2005, 01:55 PM
You should probably read up on MySQL databases in PHP, you won't get much further without a basic understanding of this and creating an extra field and adding the required value to that field during your insert query is pretty straightforward.

sytodave88
07-21-2005, 02:15 PM
ok i understand know

but can any one tell me a script that can mod kill the user

and i am looking for a script thats from scratch that you have 2 choices only

1)rob an bank
2)rob a casino

and each choice the leader of the oc has to hire other users to be a explosicves expert , a getaway driver and a weapons expert and for each user they have to pick what type of stuff to use i.e wepaons master has a choice of guns and each add more value to the luck of how much they get away with same for explasives expert and driver.

delinear
07-21-2005, 04:04 PM
Those are pretty specific requests really, for a ready-made script. You would have to be very lucky to find something matching your exact requirements. From what I can see your choices are:

1) Find another open source online game and modify the script to meet your requirements.
2) Write the whole thing yourself from scratch.
3) Hire someone to write it to your specifications for you.

sytodave88
07-21-2005, 04:42 PM
one other thing i need a script that bans players and can kill them

sytodave88
07-22-2005, 02:37 PM
i am geting an error message
Parse error: parse error, unexpected $ in /home/vhosts/globolwarfare.e2uhosting.com/testphp/bank.php on line 493

can some one tell me i have done wrong

here is the script




<style type="text/css" media="screen"><!--
#layer2 { height: 800px; width: 750px; left: 200px; top: 150px; position: absolute; visibility: visible; }
--></style>



<div id="layer1">
<table border=1 cellpadding=0 cellspacing=0 bordercolor="#000000">
<?
if($user['ervaring'] > 1200000000){
?>
<th class="kop"><font color="red">Admin panel</font></th>
<td bgcolor="#ffffff">
<tr>
<td><font color="red"> - <a href="onlinetext.php">Change files</a><br>

- <a href="admin_forum.php">Manage forum</a><br>

- <a href="ban.php">Ban</a><br>

- <a href="addcont.php">Add country</a><br>

- <a href="editrecords.php">Edit records</a><br>

- <a href="banip.php">Ban ip</a></td>
</tr>
<?
}
?>
<th class="kop">Main</th>
<tr>
<Td>
- <a href="Gwn.php">Gw news</a><br>
- <a href="online.php">Online players</a><br>
- <a href="find.php">Find Player</a><br>
- <a href="edit.php">Personal</a><br>
- <a href="cont.php">Countries</a><br>
- <a href="rank.php">Rank bar</a><br>
- <a href="fly.php">Airport</a><br>
- <A href="jail.php">Jail</a><br>
- <a href="hitlist.php">Hitlist</a><br>
- <a href="hospital.php">Hospital</a>
</td>
</tr>
<th class="kop">Media</th>
<tr>
<td>
- <a href="send.php">Send Message</a><br>
- <a href="inbox.php">Inbox</a><br>
- <a href="main_ond.php?nav=1">Main Forum</a><br>
- <a href="arcade.php">Arcade</a>
</td>
</tr>
<th class="kop">The streets</th>
<tr>
<td>
- <a href="bf.php">Bulletfactory</a><br>
- <a href="gta.php">GTA</a><bR>
- <a href="crimes.php">Crimes</a><br>
- <a href="bank.php">Bank</a><br>
- <a href="kill.php">Kill</a><br>
- <a href="drugs.php">Drug</a><br>
- <a href="gun.php">Gun store</a><br>
- <a href="pro.php">Protection store</a><br>
- <a href="plane.php">Plane store</a><br>
- <a href="bank.php">Bank</a>

</td>
</tr>
<th class="kop">Crew</th>
<tr>
<td>
- <a href="crew.php?p=members">Crew</a><br>
- <a href="crewf.php">Crew forum</a><br>
- <a href="crewm.php">Crew management</a>

</td>
</tr>
<th class="kop">Betting</th>
<tr>
<td>
- <a href="rr.php">Russian Roullette</a><br>
- <a href="slots.php">Slots</a><br>
- <a href="racetrack.php">Racetrack</a><br>
- <a href="number.php">Numbers game</a><br>
- <a href="blackjack.php">Blackjack</a>
</td>
</tr>
<th class="kop">Stats</th>
<tr>
<Td>
- <a href="stats.php">Statistics</a><br>
- <a href="urstats.php">Your stats</a><br>
- <a href="staff.php">staff</a><br>
- <a href="refer.php">refer</a>
</td>
</tr>
<th class="kop"><a href="logout.php">Logout</a></th>
</table>
<div id="layer2">
<center><link rel="stylesheet" href="gangstastyle.css">
<?
session_start();
require("config.php");
include("usercheck.php");
if($user['lang'] == 'en'){
?>
<table border=1 cellpadding=0 cellspacing=0 width="60%">
<tr>
<td align="center"><a href="?p=bank">Bank</a> || <a href="?p=send">Send money</a> || <a href="?p=transfers">Transfers</a></td>
</tr>
</table>
<?
if($in){
if($user['money'] < $deposit){
echo "You don't have that money";
}
$sql = mysql_query("SELECT * FROM users WHERE bank > '0' AND username='$username'");

$result = mysql_num_rows($sql);
if($result){
echo "You already have money in your bank. You will need to withdraw it if you want to add more.";
}
else{
$new_money = $user['money']-$deposit;
$new_bank = $user['bank']+$deposit;
$tijd = time()+(24*60*60);
mysql_query("UPDATE users SET money='$new_money' WHERE username='$username'");
mysql_query("UPDATE users SET bank='$new_bank' WHERE username='$username'");
mysql_query("UPDATE users SET tijd_bank='$tijd' WHERE username='$username'");
$depo = number_format($deposit);
echo "You deposited <b>$$depo</b> in your bank. After 24 hours you will get it back +5% interest.";
}
}
elseif($out){
$new_money = $user['money']+$withdraw;
$new_bank = $user['bank']-$withdraw;
if($new_bank == 0){
mysql_query("UPDATE users SET tijd_bank='0' WHERE username='$username'");
}
else{
mysql_query("UPDATE users SET money='$new_money' WHERE username='$username'");
mysql_query("UPDATE users SET bank='$new_bank' WHERE username='$username'");
$with = number_format($withdraw);
echo "You withdrew <b>$$with</b> from your bank.";
}
}
if($send){
$dbres = mysql_query("SELECT * FROM users WHERE username='$to'");
$users = mysql_fetch_array($dbres);
$result = mysql_num_rows($dbres);
if(!$result){
echo "This user doesn't excist";
}
else{
if($include == 'checked'){
$date = date("H:i:s d-m-Y");
$ip = $_SERVER['REMOTE_ADDR'];
$mesage = "$username has sent you <b>$$amount</b> with the following message:<br><br><hr><br>$message";
mysql_query("INSERT INTO messages (van,naar,datum,message,ip,gelezen) VALUES ('Notification','$username','$date','$mesage','$ip','0')");
}
$date = date("H:i:s d-m-Y");
mysql_query("INSERT INTO transfers (van,naar,amount,date) VALUES ('$username','$to','$amount','$date')");
$new_money = $user['money']-$amount;
$new_user = $users['money']+($amount-($amount/10));
mysql_query("UPDATE users SET money='$new_money' WHERE username='$username'");
mysql_query("UPDATE users SET money='$new_user' WHERE username='$to'");
echo "You gave <b>$amount</b> to <b>$to</b>.";
}
}
if($p == 'bank'){
if($in){
if($user['money'] < $deposit){
echo "You don't have that money";
}
$sql = mysql_query("SELECT * FROM users WHERE bank > '0' AND username='$username'");
$result = mysql_num_rows($sql);
if($result){
echo "You already have money in your bank. You will need to withdraw it if you want to add more.";
}
else{
$new_money = $user['money']-$deposit;
$new_bank = $user['bank']+$deposit;
$tijd = time()+(24*60*60);
mysql_query("UPDATE users SET money='$new_money' WHERE username='$username'");
mysql_query("UPDATE users SET bank='$new_bank' WHERE username='$username'");
mysql_query("UPDATE users SET tijd_bank='$tijd' WHERE username='$username'");
$depo = number_format($deposit);
echo "You deposited <b>$$depo</b> in your bank. After 24 hours you will get it back +5% interest.";
}
}
elseif($out){
$new_money = $user['money']+$withdraw;
$new_bank = $user['bank']-$withdraw;
if($new_bank == 0){
mysql_query("UPDATE users SET tijd_bank='0' WHERE username='$username'");
}
else{
mysql_query("UPDATE users SET money='$new_money' WHERE username='$username'");
mysql_query("UPDATE users SET bank='$new_bank' WHERE username='$username'");
$with = number_format($withdraw);
echo "You withdrew <b>$$with</b> from your bank.";
}
}
?>
<form action="<?=$_SERVER['PHP_SELF']; ?>?p=bank">
<table border=1 cellpadding=0 cellspacing=0>
<Th class="kop" colspan="4">Bank</th>
<tr>
<td class="sub">&nbsp;</td>
<td>Money on bank:</td>
<td>$<?=number_format($user['bank']); ?></td>
<Td class="sub">&nbsp;</td>
</tr>
<tr>
<Td class="sub">&nbsp;</td>
<td>Time left:</td>
<td><?
$rest = $user['tijd_bank']-time();
$hours = ceil($res/24);
$min = floor($rest/(24*60));
$sec = $rest%60;
if($user['tijd_bank'] > time()){
echo "$hours:$min:$sec";
}
else{
$new_money = $user['money']+($user['bank']+$int);
mysql_query("UPDATE users SET money='$new_money' WHERE username='$username'");
mysql_query("UPDATE users SET bank='0' WHERE username='$username'");
mysql_query("UPDATE users SET tijd_bank='0' WHERE username='$username'");
echo "None";
}
?></td>
<td class="sub"> &nbsp;</td>
</tR>
<tr>
<Td class="sub">&nbsp;</td>
<td> + 5% interest</td>
<td>$<?
$int = $user['bank']/20;
echo number_format($int); ?></td>
<td class="sub">&nbsp;</td>
</tr>
<tr>
<td class="sub">&nbsp;</td>
<td>Total:</td>
<Td>$<?=number_format($user['bank']+$int); ?></td>
<td class="sub">&nbsp;</td>
</tr>
<tr>
<td class="sub">&nbsp;</tD>
<td><input type="text" name="withdraw"></td>
<td><input type="text" name="deposit"></td>
<td class="sub">&nbsp;</td>
</tr>
<tr>
<td class="sub">&nbsp;</td>
<td><input type="submit" value="Withdraw" name="out"></td>
<Td><input type="submit" value="Deposit" name="in"></td>
<td class="sub">&nbsp;</td>
</tr>
</table>
</form>
<br>
<br>
<?
}
elseif($p == 'send'){
if($send){
$dbres = mysql_query("SELECT * FROM users WHERE username='$to'");
$users = mysql_fetch_array($dbres);
$result = mysql_num_rows($dbres);
if(!$result){
echo "This user doesn't excist";
}
else{
if($include == 'message'){
$date = date("H:i:s d-m-Y");
$ip = $_SERVER['REMOTE_ADDR'];
$messages = "$username has sent you <b>$$amount</b> with the following message:<br><br><hr><br>$message";
mysql_query("INSERT INTO messages (van,naar,datum,message,ip,gelezen) VALUES ('Notification','$to','$date','$messages','$ip','0')") or die(mysql_error());
}
$date = date("H:i:s d-m-Y");
mysql_query("INSERT INTO transfers (van,naar,amount,date) VALUES ('$username','$to','$amount','$date')");
$new_money = $user['money']-$amount;
$new_user = $users['money']+($amount-($amount/10));
mysql_query("UPDATE users SET money='$new_money' WHERE username='$username'");
mysql_query("UPDATE users SET money='$new_user' WHERE username='$to'");
echo "You gave <b>$amount</b> to <b>$to</b>.";
}
}
?>
<form action="<?=$_SERVER['PHP_SELF']; ?>">
<Table border=1 cellpadding=0 cellspacing=0>
<Th class="kop" colspan="4">Send Money</th>
<tr>
<td class="sub">&nbsp;</td>
<td>To:</td>
<td><input type="text" name="to"></td>
<td class="sub">&nbsp;</td>
</tr>
<tr>
<td class="sub">&nbsp;</td>
<td>Amount:</td>
<td>$<input type="text" name="amount"></td>
<td class="sub">&nbsp;</td>
</tr>
<tr>
<td class="sub">&nbsp;</td>
<td colspan="2"><input type="checkbox" name="include" value="message"> Include message</td>
<td class="sub">&nbsp;</td>
</tr>
<tr>
<td class="sub">&nbsp;</td>
<td>Message:</td>
<td><textarea name="message" rows="9" cols="39"></textarea></td>
<td class="sub">&nbsp;</td>
</tr>
<tr>
<td class="sub">&nbsp;</td>
<td>&nbsp;</td>
<Td><input type="submit" value="Send" name="send"></td>
<td class="sub">&nbsp;</td>
</tr>
</table>
</form>

<link rel="stylesheet" href="gangstastyle.css">
<style type="text/css" media="screen"><!--
</style>
<?
session_start();
require("config.php");
include("usercheck.php");
if($user['lang'] == 'en'){
?>

<?
if($in){
if($user['money'] < $deposit){
echo "You don't have that money";
}
$sql = mysql_query("SELECT * FROM users WHERE bank > '0' AND username='$username'");
$result = mysql_num_rows($sql);
if($result){
echo "You already have money in your bank. You will need to withdraw it if you want to add more.";
}
else{
$new_money = $user['money']-$deposit;
$new_bank = $user['bank']+$deposit;
$tijd = time()+(24*60*60);
mysql_query("UPDATE users SET money='$new_money' WHERE username='$username'");
mysql_query("UPDATE users SET bank='$new_bank' WHERE username='$username'");
mysql_query("UPDATE users SET tijd_bank='$tijd' WHERE username='$username'");
$depo = number_format($deposit);
echo "You deposited <b>$$depo</b> in your bank. After 24 hours you will get it back +5% interest.";
}
}
elseif($out){
$new_money = $user['money']+$withdraw;
$new_bank = $user['bank']-$withdraw;
if($new_bank == 0){
mysql_query("UPDATE users SET tijd_bank='0' WHERE username='$username'");
}
else{
mysql_query("UPDATE users SET money='$new_money' WHERE username='$username'");
mysql_query("UPDATE users SET bank='$new_bank' WHERE username='$username'");
$with = number_format($withdraw);
echo "You withdrew <b>$$with</b> from your bank.";
}
}
if($send){
$dbres = mysql_query("SELECT * FROM users WHERE username='$to'");
$users = mysql_fetch_array($dbres);
$result = mysql_num_rows($dbres);
if(!$result){
echo "This user doesn't excist";
}
else{
if($include == 'checked'){
$date = date("H:i:s d-m-Y");
$ip = $_SERVER['REMOTE_ADDR'];
$mesage = "$username has sent you <b>$$amount</b> with the following message:<br><br><hr><br>$message";
mysql_query("INSERT INTO messages (van,naar,datum,message,ip,gelezen) VALUES ('Notification','$username','$date','$mesage','$ip','0')");
}
$date = date("H:i:s d-m-Y");
mysql_query("INSERT INTO transfers (van,naar,amount,date) VALUES ('$username','$to','$amount','$date')");
$new_money = $user['money']-$amount;
$new_user = $users['money']+($amount-($amount/10));
mysql_query("UPDATE users SET money='$new_money' WHERE username='$username'");
mysql_query("UPDATE users SET money='$new_user' WHERE username='$to'");
echo "You gave <b>$amount</b> to <b>$to</b>.";
}
}
if($p == 'bank'){
if($in){
if($user['money'] < $deposit){
echo "You don't have that money";
}
$sql = mysql_query("SELECT * FROM users WHERE bank > '0' AND username='$username'");
$result = mysql_num_rows($sql);
if($result){
echo "You already have money in your bank. You will need to withdraw it if you want to add more.";
}
else{
$new_money = $user['money']-$deposit;
$new_bank = $user['bank']+$deposit;
$tijd = time()+(24*60*60);
mysql_query("UPDATE users SET money='$new_money' WHERE username='$username'");
mysql_query("UPDATE users SET bank='$new_bank' WHERE username='$username'");
mysql_query("UPDATE users SET tijd_bank='$tijd' WHERE username='$username'");
$depo = number_format($deposit);
echo "You deposited <b>$$depo</b> in your bank. After 24 hours you will get it back +5% interest.";
}
}
elseif($out){
$new_money = $user['money']+$withdraw;
$new_bank = $user['bank']-$withdraw;
if($new_bank == 0){
mysql_query("UPDATE users SET tijd_bank='0' WHERE username='$username'");
}
else{
mysql_query("UPDATE users SET money='$new_money' WHERE username='$username'");
mysql_query("UPDATE users SET bank='$new_bank' WHERE username='$username'");
$with = number_format($withdraw);
echo "You withdrew <b>$$with</b> from your bank.";
}
}
?><br>
<br>
<?
}
elseif($p == 'send'){
if($send){
$dbres = mysql_query("SELECT * FROM users WHERE username='$to'");
$users = mysql_fetch_array($dbres);
$result = mysql_num_rows($dbres);
if(!$result){
echo "This user doesn't excist";
}
else{
if($include == 'message'){
$date = date("H:i:s d-m-Y");
$ip = $_SERVER['REMOTE_ADDR'];
$messages = "$username has sent you <b>$$amount</b> with the following message:<br><br><hr><br>$message";
mysql_query("INSERT INTO messages (van,naar,datum,message,ip,gelezen) VALUES ('Notification','$to','$date','$messages','$ip','0')") or die(mysql_error());
}
$date = date("H:i:s d-m-Y");
mysql_query("INSERT INTO transfers (van,naar,amount,date) VALUES ('$username','$to','$amount','$date')");
$new_money = $user['money']-$amount;
$new_user = $users['money']+($amount-($amount/10));
mysql_query("UPDATE users SET money='$new_money' WHERE username='$username'");
mysql_query("UPDATE users SET money='$new_user' WHERE username='$to'");
echo "You gave <b>$amount</b> to <b>$to</b>.";
}
}
?><?
}
elseif($p == 'transfers'){
?>
<table border=1 cellpadding=0 cellspacing=0>
<th class="kop" colspan="4">Last 5 transfers</th>
<?
$t = mysql_query("SELECT * FROM transfers WHERE van='$username'");
while($tran = mysql_fetch_array($t)){
?>
<tr>
<td class="sub">&nbsp;</td>
<td>You sent <?=$tran['naar']; ?> $<?=number_format($tran['amount']); ?></td>
<td><?=$tran['date']; ?></td>
<td class="sub">&nbsp;</td>
</tr>
<?
}
?>
</table>
<br>
<Br>
<table border=1 cellpadding=0 cellspacing=0>
<Th class="kop" colspan="4">Last 5 received</th>
<?
$r = mysql_query("SELECT * FROM transfers WHERE naar='$username'");
while($rec = mysql_fetch_array($r)){
?>
<tr>
<td class="sub">&nbsp;</td>
<td><?=$rec['van']; ?> has sent you $<?=number_format($rec['amount']); ?></td>
<td><?=$rec['date']; ?></td>
<td class="sub">&nbsp;</td>
</tr>
</table>
</div>

delinear
07-22-2005, 03:18 PM
You have an open while loop starting around line 482 which isn't closed off. Usually these errors are caused by such tags being left open.
while($rec = mysql_fetch_array($r)){
Also, if you're going to post a big chunk of code, please wrap it in [ php] [ /php] tags to be kinder on our eyes :thumbsup: