Jump to content
MakeWebGames

Help!?


Shahed3639

Recommended Posts

(Idk if this is in the right forum but yeah)

 

I need help atm with my game infamouswars.x10.mx

I badly need help

With hospital and jail

I need a person to help me out for free

Its quite hard for me.

Im doing media for gcse so i choose to make a game.

So can some one help me out pleasee

Pleasse Inbox me.

Edited by Shahed3639
Link to comment
Share on other sites

In Item management the funtions dont work for some reason?

When i add the funtions to global func It kills the whole game. So I have to take it off for the game to work

Here is the function

 

 

 

function inv_add($userid,$itemid,$itemtype,$itemname,$qty,$itemsellprice)

{

$invitem = mysql_query("SELECT * FROM inventory WHERE inv_userid={$userid} AND inv_item_id={$itemid} AND inv_item_type={$itemtype}");

if (mysql_num_rows($invitem) == 0)

{

mysql_query("INSERT INTO inventory VALUES ('',{$userid},{$itemid},{$itemtype},'{$itemname}',{$qty},{$itemsellprice})") or die(mysql_error());

}

else

{

$inv = mysql_fetch_array($invitem);

mysql_query("UPDATE inventory SET inv_item_qty=inv_item_qty+{$qty} WHERE inv_id={$inv['inv_id']}") or die(mysql_error());

}

}

function inv_del($userid,$invitem,$invtype,$qty)

{

$inventory = mysql_query("SELECT * FROM inventory WHERE inv_userid={$userid} AND inv_item_id={$invitem} AND inv_item_type={$invtype}");

$i = mysql_fetch_array($inventory);

if ($i['inv_item_qty'] == 1)

{

mysql_query("DELETE FROM inventory WHERE inv_item_id={$i['inv_item_id']} AND inv_item_type={$i['inv_item_type']}") or die(mysql_error());

}

else

{

mysql_query("UPDATE inventory SET inv_item_qty=inv_item_qty-{$qty} WHERE inv_item_id={$i['inv_item_id']} AND inv_item_type={$i['inv_item_type']}");

}

}

function att_log($attacker,$attacked,$result,$mugged)

{

mysql_query("INSERT INTO attacklogs VALUES ('',{$attacker},{$attacked},'{$result}',{$mugged},NOW())");

}

function itemxfer_log($sender,$receiver,$itemtype,$itemid,$amount)

{

mysql_query("INSERT INTO item_xfers VALUES ('',{$sender},{$receiver},{$itemtype},{$itemid},{$amount},NOW())");

}

function itembuy($buyer,$itemtype,$itemid,$amount)

{

mysql_query("INSERT INTO itembuy_log VALUES ('',{$buyer},{$itemtype},{$itemid},{$amount},NOW())");

}

function market_log($seller,$buyer,$type,$item,$amount,$price,$currency)

{

mysql_query("INSERT INTO market_log VALUES ('',{$seller},{$buyer},{$type},{$item},{$amount},{$price},{$currency},NOW())");

}

function auction_log($seller,$buyer,$type,$item,$price,$currency)

{

mysql_query("INSERT INTO auction_log VALUES ('',{$seller},{$buyer},{$type},{$item},{$price},{$currency},NOW())");

Edited by Shahed3639
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...