Jump to content
MakeWebGames

V2 Mug For Crystals


Recommended Posts

  • 11 months later...
1 hour ago, corruptcity || skalman said:

This is a basic version of what your after, you can Improve it yourself and can combine the 2 queries into one. Also added an event_add for it to
 

$crystals = $ir['crystals']; if($crystals > 5) { $crystals = 5; } $crystalsStole = (int) rand(1, $crystals); $db->query("UPDATE `users` SET `crystals` = `crystals` - {$crystalsStole} WHERE `userid` = {$r['userid']}"); event_add($r['userid'], "<a href='viewuser.php?u=$userid'>{$ir['username']}</a> attacked you and stole {crystalStole} crystals from you!", $c);

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

may be a dumb question.... but im still new at this so..... What file do i put that in?

 

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