Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 56

Thread: Hardware bans

  1. #21
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    Quote Originally Posted by Tally View Post
    Whenever you use the clientcmd function, all open menus will close, because closeMenu() and closeInGameMenu() are part of the clientcmd function. This is one of the drawbacks with the function.

    In this case the admins should decide whether they prefer to kick banned players as soon as they join the server or on SpawnPlayer only.
    set logfile 2

  2. #22
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by guiismiti View Post
    In this case the admins should decide whether they prefer to kick banned players as soon as they join the server or on SpawnPlayer only.
    You could move it to onJoinedTeam(), the MOTD menu will have been closed by the player at that point.

  3. #23
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Possible to show the value of mod_status with an iprint?

  4. #24
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    I think so. You would need some code similar to the login system.

    If you want to simply know its value at a certain point, I recommend that you replace seta mod_status disconnect with seta mod_status say testvalue. Should be more simple.
    set logfile 2

  5. #25
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    I just want to make it that it checks the value when you spawn. If the value is "disconnect", show the message "You are banned", wait 3 seconds and kick you. If its another value than "disconnect" dont do anything

  6. #26
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    Try to add
    PHP Code:
    self.pers["banstatus"] = "banned"
    Right before the line that writes config.cfg and disconnects the banned player.
    Then, in checkForBanned() test self.pers["banstatus"] value.

    I tried it and it didn't work, I'm probably missing something. I'm creating a different response right now.
    set logfile 2

  7. #27
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Yeah it doesnt save the self.pers["banstatus"], unless u use openfile and print it in a file on the ftp

  8. #28
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    Instead of using iprint you can open a popmenu
    set logfile 2

  9. #29
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Any ideas how? I just want to let the player know he has a ban and then disconnects him

  10. #30
    Private
    Join Date
    May 2013
    Posts
    27
    Thanks
    0
    Thanked 19 Times in 11 Posts
    PHP Code:
    self setClientCvar("com_errorTitle""BANNED");
    self setClientCvar("com_errorMessage""You have been disconnected, because you are banned");
    wait(1);
    self thread execClientCommand("disconnect"); 

  11. The Following 2 Users Say Thank You to PatmanSan For This Useful Post:

    guiismiti (5th January 2014),Ni3ls (5th January 2014)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •