if anyone has trouble with starterkit.php and dont know what to do
Hey guys if your having problems ok and you dont know what to do well here you go
<?php
/*-----------------------------------------------------
-- Made by Akash for CE users
-- Free Gift
-- Mail [email]
[email protected][/email] if you need help or converting
-----------------------------------------------------*/
if (file_exists('globals.php')) {
require('globals.php');
}
else {
session_start();
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
include "mysql.php";
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());
$ir=mysql_fetch_array($is);
check_level();
$fm=money_formatter($ir['money']);
$lv=date('F j, Y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm);
$h->menuarea();
}
if ($ir['donatorpack']== 0)
{
print "Welcome to your game name, we hope you enjoy your stay and here is a complimentary pack from us to get you started."; //This is the writing they will get after clicking on the button in explore.php
$sql = sprintf("
UPDATE
`users`
SET
`money` = `money` + '%d',
`crystals` = `crystals` + '%d',
`donatordays` = `donatordays` + '%d',
`vip` = `vip` + '%d',
`donatorpack` = '%d'
WHERE
(`userid` = %u)",
10000, 100, 5, 5, 1, $userid);
mysql_query($sql);
//Edit any of these to credit whatever you want e.g. instead of points, it may be crystals. Please DO NOT change the donatorpack=1 as this is part of the mod. Changing it may result in users claiming more than one pack.
$itmid = 1; //This is the item ID, whatever item you want it to add, just type in the ID here. If you want a random item then replace $itmid = 1; with itmid=rand(1,100), with the numbers being whatever you want.
mysql_query("INSERT INTO inventory VALUES('',$itmid,$userid,1)",$c); print"
"; //You do not need to change anything here, unless you want more than one of the item to be given. In this case, just edit the 1 at the end to the quantity.
event_add($userid,"You were given a complimentary starter kit to begin you off. We hope you enjoy your stay at {$set['game_name']} and please mail [url='viewuser.php?u=1'][b]<font color=red>owner of the game[/b]</font>[/url] for any help you need.",$c); //This is the event they will receive once they have been credited. Edit the Owner Name to the owner's name and if needed, the writing in the event.
}
else
{
die("You have already claimed your starter kit!"); //This simply ensures that the user does not claim more than one pack.
}
$h->endpage();
?>