Raised This Month: $ Target: $400
 0% 

.............


Post New Thread Reply   
 
Thread Tools Display Modes
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 04-25-2015 , 16:42   Re: On ban ID, ban IP.
Reply With Quote #31

Quote:
Originally Posted by Sdg View Post
You know why this line not appear?

PHP Code:
PrintToConsole(client"========== Test ============\nNombre:  %N\n SteamID: %s \n IP: %s /n========== Test ============\n"client,  sAuthIDip); 
Just to be sure - do you want to print this line(s) to the client that is getting banned? Or to the whole server? Or who?

If you are placing the PrintToConsole above the "if (StrEqual(command, "SMAC"))", what happens then?

In your PrintToConsole, you have a "/n" before all the "===", however, based on your other parts of the message, I suppose you want it to be "\n" to represent a new line.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
Sdg
BANNED
Join Date: Mar 2014
Old 04-25-2015 , 16:54   Re: On ban ID, ban IP.
Reply With Quote #32

Quote:
Originally Posted by arne1288 View Post
Just to be sure - do you want to print this line(s) to the client that is getting banned?
To client banned, of course..

Quote:
Originally Posted by arne1288 View Post
If you are placing the PrintToConsole above the "if (StrEqual(command, "SMAC"))", what happens then?
Exactly the same.
Works only for the ban of smac...

Quote:
Originally Posted by arne1288 View Post
In your PrintToConsole, you have a "/n" before all the "===", however, based on your other parts of the message, I suppose you want it to be "\n" to represent a new line.
New line, yes!
But the structure of the line is not the problem.
Sdg is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 04-27-2015 , 03:42   Re: On ban ID, ban IP.
Reply With Quote #33

You're trying to print to the console of the client that was banned? Maybe you want PrintToServer?

I would have to check, but perhaps OnBanClient triggers after the client has been kicked from the server? Maybe depending on method?
__________________
View my Plugins | Donate
TnTSCS is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 04-27-2015 , 06:39   Re: On ban ID, ban IP.
Reply With Quote #34

Quote:
Originally Posted by TnTSCS View Post
You're trying to print to the console of the client that was banned? Maybe you want PrintToServer?

I would have to check, but perhaps OnBanClient triggers after the client has been kicked from the server? Maybe depending on method?
No, OnBanClient is called b4 the game's engine is known that the client is banned(and b4 their kicked).
https://github.com/alliedmodders/sou...nning.cpp#L315
__________________
WildCard65 is offline
Sdg
BANNED
Join Date: Mar 2014
Old 04-27-2015 , 08:32   Re: On ban ID, ban IP.
Reply With Quote #35

Maybe it depends on the method of ban?
Like I said...
When ban comes from smac, the line works perfectly.

smac ban:
PHP Code:
        decl String:sKickMsg[256];
        
FormatEx(sKickMsgsizeof(sKickMsg), "%T""SMAC_Banned"client);
        
BanClient(clientdurationBANFLAG_AUTOsReasonsKickMsg"SMAC"); 
When ban comes from admin ( sm_ban or sm_banip ) It does not work.

Last edited by Sdg; 04-27-2015 at 08:34.
Sdg is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 04-27-2015 , 10:39   Re: On ban ID, ban IP.
Reply With Quote #36

Well, sm_banip uses BanIdentity so it'll trigger the OnBanIdentity, for sm_ban, idk y it's not doing the PrintToConsole
__________________
WildCard65 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode