Jump to content
MakeWebGames

[mccode] Reset your users without deleating them


Recommended Posts

Posted

Hey all,

This mod was made by me for people who want to keep all their users with their ids and login names and passwors etc.

I know some can code this in a couple of mins and I defently know I am a avarage coder compared to certain ce coders but I wanted to share this mod for all the people who cannot code as good as me...

 

Name it reset.php

 

You're unable to view this code.

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

Posted

Re: [v1 & v2]Reset your users without deleating them

Why you using so many querys? you can shrink that to 3 querys

for example for users you can do something like:

You're unable to view this code.

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

 

etc.

Posted

Re: [v1 & v2]Reset your users without deleating them

lol, I made this ages ago when i was less experianced but only just found it when I was looking around my lappy

Posted

Re: [v1 & v2]Reset your users without deleating them

Does this have any security feature to keep players from loading the page and reseting everyone!! I'm guessing it's best to only have this script uploaded when you actually want to do this!

Posted

Re: [v1 & v2]Reset your users without deleating them

 

Does this have any security feature to keep players from loading the page and reseting everyone!! I'm guessing it's best to only have this script uploaded when you actually want to do this!

Just Add This To The Top

You're unable to view this code.

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

  • 2 months later...
Posted

Re: [v1 & v2]Reset your users without deleating them

Is there an easy way to do this with out the NPC's geting reset? I'm guessing something like

UPDATE users SET hp=100 WHERE user_level=1;

though there is no user_level code in the userstats table.

Posted

Re: [v1 & v2]Reset your users without deleating them

 

You're unable to view this code.

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

 

Maybe that would be better?

theres not really any point clearing fedjail because well they normally did something bad...

Posted

Re: [v1 & v2]Reset your users without deleating them

Read my post again, there is no user_level in userstats so that won't work.

userid int(11) NOT NULL default '10',

strength bigint(25) NOT NULL default '10',

agility bigint(25) NOT NULL default '10',

guard bigint(25) NOT NULL default '10',

labour bigint(25) NOT NULL default '10',

IQ bigint(25) NOT NULL default '10'

You have to add some

$q=$db->query("SELECT userstats.*, users.* FROM blah blah blah...",$c);

code if it can be made to work.

Posted

Re: [v1 & v2]Reset your users without deleating them

For stats and NPCs, I think the easiest way would be to create user_level in the userstats

ALTER TABLE `userstats` ADD `user_level` int(11) NOT NULL default 1;

and change the user_level there for any one not at Level 1. Then

mysql_query("UPDATE userstats SET strength=10,agility=10,guard=10,labour=10,IQ=10 WHERE user_level=1", $c) or die(mysql_error());

would work.

  • 2 weeks later...
Posted

Re: [v1 & v2]Reset your users without deleating them

I know how to do it, but a *lot* of people don't. And I'm too tired to do it no was I've been awake for more than 24 hours (I don't like being up this long - I get grumpy! xD)

Posted

Re: [v1 & v2]Reset your users without deleating them

 

You're unable to view this code.

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

That also only resets staff and users since npc is user level 0 on my site but it will reset there stats which is easy to re-add

  • 2 months later...
Posted

Re: [v1 & v2]Reset your users without deleating them

if i put this mod on my c panel do i need to put it anywhere else like in the staff panel for the reset or anything like that

Posted

Re: [v1 & v2]Reset your users without deleating them

Parse error: syntax error, unexpected T_STRING in /home/reaper66/public_html/reset.php on line 10

 

i get that when i add it in i got the link in there but i click it to test it and i get that message how do i fix it i used the updated version for v2

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