xHosts.uk - Windows & Linux VPS - Cosmic Guard
[VIP] Member
- Joined
- Sep 10, 2011
- Messages
- 857
- Reaction score
- 354
Hey
I see people wanting neat little addons for RevCMS
Works with Standard PHX / GTE database
I made a simple random little prize award script, great for using on your client to reward users, easy to expand on and edit
Currently setup to award a random prize of either credits, pixels, shells (vip points) or a furni
Hope its useful for some people
Simply copy and paste the code below at the top of your client.php file and edit prizes for your own hotel
Credits :
Kryptos - Rev VMS
Me - Coding this addon
Robot - Helping test script
Katrina2015 - Helping test the script
I see people wanting neat little addons for RevCMS
Works with Standard PHX / GTE database
I made a simple random little prize award script, great for using on your client to reward users, easy to expand on and edit
Currently setup to award a random prize of either credits, pixels, shells (vip points) or a furni
Hope its useful for some people
Simply copy and paste the code below at the top of your client.php file and edit prizes for your own hotel
Credits :
Kryptos - Rev VMS
Me - Coding this addon
Robot - Helping test script
Katrina2015 - Helping test the script
<?php
$random = rand(95,358); // Random number range, closer the min and max more chance of winning
switch ($random){
case 98: // Credits
mysql_query("UPDATE users SET credits = credits+500 WHERE id = '".$_SESSION['user']['id']."'");
echo "<script>alert('Congratulations!, {username} You have won 500 credits');</script>";
break;
case 186: // Pixels
mysql_query("UPDATE users SET activity_points = activity_points+500 WHERE id = '".$_SESSION['user']['id']."'");
echo "<script>alert('Congratulations!, {username} You have won 500 pixels');</script>";
break;
case 356: // Points
mysql_query("UPDATE users SET vip_points = vip_points+50 WHERE id = '".$_SESSION['user']['id']."'");
echo "<script>alert('Congratulations!, {username} You have won 50 points');</script>";
break;
case 239: // furni // Furni ID 202 is throne in basic phx catalogue
mysql_query("INSERT INTO items (`user_id`, `base_item`) VALUES ('".$_SESSION['user']['id']."', 202);");
echo "<script>alert('Congratulations!, {username} You have won a rare throne');</script>";
break;
}
?>
Attachments
You must be registered for see attachments list
Last edited: