Jump to content

Crime effect


Recommended Posts

I dont see why it wouldnt. You just set the variable like the above sample is $v=rand (2000, 5000);

So in this case it would be something like:

$item=rand(1, 10);
$result=$db->LoadData("select itemname from items where itemid = ?", $item);
/*here is where you would put your success code*/
ResultMessage(Translate("You stole %s.",$result['itemname']),false);


Couple discalimers:

1. Now im still learning nwe and dont really know table and column names yet so be sure they are right.

2. Im not great at sprintf or printf or whatever you may call but I think the %s is the right one to use.

3. Also last I heard you can call out your queries by column name now but if not I believe $result->fields[0]

will work if $result['itemname'] fails.

4. This isnt tested but you should get the gist of it cause in theory it should work but im sure somone may chime in and show a better, faster, more elaborate way to do so

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.

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...