Jump to content
MakeWebGames

[V1] FREE! ID refiller/counter


oxidati0n

Recommended Posts

This is really good.. I've only thought of the mod just now.

This is good if you delete players regulary on your game, This allows those slots to be filled in without no need in trying.

Tested and Works

 

Firstly Run this SQL

You're unable to view this code.

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

 

Next open register.php and find where it says

You're unable to view this code.

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

 

Replace with

You're unable to view this code.

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

 

Now add this to your daysold.php cron

You're unable to view this code.

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

 

Updated----

Your done!

Please give me +1

REMEMBER: If you want quality mods like these always buy from http://www.netcodesuk.com/mods.php.

Link to comment
Share on other sites

Re: [V1] FREE! ID refiller/counter

Still don't work properly. If you don't have any id's in the free_id's table then it gives a query error. You need to have it to where it only deletes from the free_id's table if there is something in it.

Link to comment
Share on other sites

  • 2 weeks later...

Re: [V1] FREE! ID refiller/counter

Id Refiller Counter V2

 

CREATE TABLE free_ids ( id INT( 11 ) NOT NULL ) TYPE=MYISAM ;

 

Add to cron_day

$q=$db->query("SELECT userid FROM users ORDER BY userid DESC");

$total=$db->num_rows($q);

while($total > 0)

{

$q2=$db->query("SELECT * FROM users WHERE userid={$total}");

$q3=$db->query("SELECT * FROM free_ids WHERE id={$total}");

if($db->num_rows($q2) == 0 and $db->num_rows($q3) == 0)

{

$db->query("INSERT INTO free_ids (id) VALUES ({$total});");

}

$total--;

}

In register.php

Find

$db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip) VALUES( '{$username}', '{$_POST['username']}', md5('{$_POST['password']}'), 1, $sm, 1, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, 'Male', unix_timestamp(), '{$_POST['email']}', -1, '$ip');")

$i=mysql_insert_id($c);

Replace

$getidq=$db->query("SELECT * FROM free_ids ORDER BY id DESC LIMIT 1;");

if($db->num_rows($getidq) == 0)

{

$id="";

} else {

$getid=$db->fetch_row($getidq);

$id=$getid['id'];

}

if($db->num_rows($getidq))

{

$db->query("DELETE FROM free_ids WHERE id={$id}");

}

$db->query("INSERT INTO users (userid, username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES('$id' ,'{$username}', '{$_POST['username']}', md5('{$_POST['password']}'), 1, $sm, 1, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')");

$i=mysql_insert_id($c);

This is my V2 of this mod from OXI. Works perfect. +1 for you oxi

Link to comment
Share on other sites

Re: [V1] FREE! ID refiller/counter

 

Id Refiller Counter V2

 

CREATE TABLE free_ids ( id INT( 11 ) NOT NULL ) TYPE=MYISAM ;

 

Add to cron_day

$q=$db->query("SELECT userid FROM users ORDER BY userid DESC");

$total=$db->num_rows($q);

while($total > 0)

{

$q2=$db->query("SELECT * FROM users WHERE userid={$total}");

$q3=$db->query("SELECT * FROM free_ids WHERE id={$total}");

if($db->num_rows($q2) == 0 and $db->num_rows($q3) == 0)

{

$db->query("INSERT INTO free_ids (id) VALUES ({$total});");

}

$total--;

}

In register.php

Find

$db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip) VALUES( '{$username}', '{$_POST['username']}', md5('{$_POST['password']}'), 1, $sm, 1, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, 'Male', unix_timestamp(), '{$_POST['email']}', -1, '$ip');")

$i=mysql_insert_id($c);

Replace

$getidq=$db->query("SELECT * FROM free_ids ORDER BY id DESC LIMIT 1;");

if($db->num_rows($getidq) == 0)

{

$id="";

} else {

$getid=$db->fetch_row($getidq);

$id=$getid['id'];

}

if($db->num_rows($getidq))

{

$db->query("DELETE FROM free_ids WHERE id={$id}");

}

$db->query("INSERT INTO users (userid, username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES('$id' ,'{$username}', '{$_POST['username']}', md5('{$_POST['password']}'), 1, $sm, 1, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')");

$i=mysql_insert_id($c);

This is my V2 of this mod from OXI. Works perfect. +1 for you oxi

Thanks for sharing with these guys.

Link to comment
Share on other sites

  • 5 months later...

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