PDA

View Full Version : Account system ban



Rocky
10th November 2013, 09:17
Does somebody know how i can ban account? And script for it . Thanks.

Jeplaa
10th November 2013, 09:48
So, however you made your "account-system" the easiest way is to define ban on player in his data-file.

Example:


if(!isDefined(self.banned)) fPrintLn(file, 0); else fPrintLn(file, 1);

malyczolg
10th November 2013, 09:56
u can use this :
at the 5 line of create accout add self.banned = 0


if(fgetarg(f,5)!= 0)
{
self setClientCvar("login_message", "Account Baneed");
self setClientCvar("ui_allow_login_error","0");
self setClientCvar("ui_allow_login_accept","1");
self setClientCvar("ui_allow_password_error","1");
self setClientCvar("ui_allow_password_accept","0");
closefile(f);
continue;
}

need help ? xf:)

Rocky
10th November 2013, 09:56
Ban by command? ;) or how?

YuriJurek
10th November 2013, 11:57
For God sake, they should make a new Forum for Newbies, that I could keep away from it, because it's just ridiculous how some ppl are behaving/treating scripting here, some of them think that everybody will do everything for them, and they don't need to do any work, and others don't even know what they are saying(malyczolg) but they have to post that nonsense anyway.
_________________________________________________

If you want to restrict an account from logging in, just make a new variable eg. "self.banned", set default to false when creating the account, and save it in the user file, then when logging in check if "self.banned" is true or false, if it's true then display an error message and return to the start.

Tally
10th November 2013, 12:04
For God sake, they should make a new Forum for Newbies, that I could keep away from it, because it's just ridiculous how some ppl are behaving/treating scripting here, some of them think that everybody will do everything for them, and they don't need to do any work, and others don't even know what they are saying(malyczolg) but they have to post that nonsense anyway.
_________________________________________________

If you want to restrict an account from logging in, just make a new variable eg. "self.banned", set default to false when creating the account, and save it in the user file, then when logging in check if "self.banned" is true or false, if it's true then display an error message and return to the start.

This is nothing new. Mod forums have been like this since day 1. They don't want to be told how to do it themselves - they want someone to do it for them. So, always translate "how do you do this?" as "Will someone do it for me?" That's just the way it is. Get used to it.

YuriJurek
10th November 2013, 12:15
Hehe right, that's completely true.