Adblock breaks this site

::tempban (1-10hours) help!

Discussion in 'RuneScape 3 General' started by Dragonflame, Sep 16, 2009.

  1. Dragonflame

    Dragonflame Newcomer

    Joined:
    Sep 16, 2009
    Posts:
    3
    Referrals:
    0
    Sythe Gold:
    0
    ::tempban (1-10hours) help!

    Yeh guys im Head administrator Dragonflame from falconpking and i wanna know how to make ::tempban (1-10 hours) if someone can help me, please help.
     
  2. MiM3

    MiM3 Guru
    Banned

    Joined:
    Mar 21, 2006
    Posts:
    1,330
    Referrals:
    1
    Sythe Gold:
    0
    ::tempban (1-10hours) help!

    Ban them, then unban in 1-10 hours.

    Simple enough.
     
  3. VeTo

    VeTo Active Member
    Banned

    Joined:
    Sep 16, 2009
    Posts:
    141
    Referrals:
    0
    Sythe Gold:
    0
    ::tempban (1-10hours) help!

    well i don't think SMF supports doing stuff like that. I may be wrong but your best bet is yeah to ban and unban them.
     
  4. Mr.Smooth

    Mr.Smooth Active Member

    Joined:
    Aug 17, 2008
    Posts:
    246
    Referrals:
    0
    Sythe Gold:
    2
    ::tempban (1-10hours) help!

    why do u even code if you don't know how to make something simple like this...
     
  5. Dragonflame

    Dragonflame Newcomer

    Joined:
    Sep 16, 2009
    Posts:
    3
    Referrals:
    0
    Sythe Gold:
    0
    ::tempban (1-10hours) help!

    Smooth listen, this isn't simple to code, i don't know how to add the hours in the ::tempban command. That's why i ask it. If u think it is so easey why don't u tell me then? I'm working on a bigg server so if i would ban and then unban, i would make mistakes.
     
  6. NickV

    NickV Float On
    Banned

    Joined:
    Jun 16, 2007
    Posts:
    3,015
    Referrals:
    5
    Sythe Gold:
    2
    Vouch Thread:
    Click Here
    ::tempban (1-10hours) help!

    Wrong section.
    It's not easy at all, lol. Would either involve an ingame process timer, which would most likely cause major lag, or make an SQL based temp ban system, both of which I won't go over. User Rune-Server or some shit for that.
     
  7. Mr.Smooth

    Mr.Smooth Active Member

    Joined:
    Aug 17, 2008
    Posts:
    246
    Referrals:
    0
    Sythe Gold:
    2
    ::tempban (1-10hours) help!

    It's very easy timers don't lag it is things like constant gfx or respawning objects that are already there.


    I am geussing SQL is far to hard for you.
    However it could read the time from your computer everytime you start your server.

    I shall provide something simpler

    60 seconds = 1 minute
    60 minute = 1 hour
    24 hours = 1 day

    We need atleast 4 voids and 4 valuables
    1 for every valuable we it is very simple

    public void minutetimer() {
    if (timeseconds == 60) {
    timeseconds = 0;
    timeminutes = +1;
    server.java (banedminutes = -1);
    }}
    public void hourtimer() {
    if (timeminutes == 60) {
    timeminutes = 0;
    timehours = +1;
    server.java (banedhours = -1);
    }}
    public void resettimer() {
    if (timehours == 24) {
    timeseconds = 0;
    timeminutes = 0;
    timehours = 0;
    }}

    you add this under boolean process()
    minutetimer();
    hourtimer();
    resettimer() ;
    timeseconds = +1;

    then you make it save the time to a notepad so when you restard your server it pick up the timer where it last stopted.
    Now that you have global time it is very easy to add a punichsment system based on that,all you do is add a void like this and put it inside the hour or minute void depending on what amount u require.
    Add a notepad that writes the names down of timed bans,use bans as an example it's nothing big.

    This void for example disconects the player if timedban = set to true
    this happends when an admin banns him be sure to make timedban save to the characters server file or it will reset when he gets kicked
    when its true and he trys to login it wil show a message above the login box stating he has to wait the amount u entered - the amount the time afetr hes ban has passed.

    public void timedban() {
    if (timedban == true){
    sendloginmessage ("Sorry but you are banned +"bannedhours". +"Bannedminutes" more please come back after.)
    ignorelogin();
    disconect();
    }}

    after that create a command where you enter ban player and enter (timeban username hours minutes)
    combine ban and setitem commands to create this!

    I know it is evry roughly explained it is also not copy and paste i jut coded this without any server files so most valuables are rong.
     
  8. Dragonflame

    Dragonflame Newcomer

    Joined:
    Sep 16, 2009
    Posts:
    3
    Referrals:
    0
    Sythe Gold:
    0
    ::tempban (1-10hours) help!

    Thanks alot :D i hope it works.
     
< New Update! New Tab!?!/ | WOW!!! 30days free runescape members >


 
 
Adblock breaks this site