Raised This Month: $12 Target: $400
 3% 

Solved Warning to the player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 02-17-2020 , 05:13   Warning to the player
Reply With Quote #1

How can I warn players three times?
But in case of player neglect
player ban
Or
player kick

Last edited by amirwolf; 02-18-2020 at 15:28.
amirwolf is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 02-17-2020 , 05:46   Re: Warning to the player
Reply With Quote #2

https://forums.alliedmods.net/showth...8733?p=1098733
https://forums.alliedmods.net/showth...=57411?p=57411
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 02-17-2020 , 10:10   Re: Warning to the player
Reply With Quote #3

thanks for your response
But I want something else

I have a plugin that automatically sends a message to the player in case of a mistake
player Then receive a warning message three times
Then run the command

(You have 3 deadlines => You have 2 deadlines => You have 1 deadlines => You were banned)

I just want one example

Sorry for my bad English

Last edited by amirwolf; 02-17-2020 at 17:46.
amirwolf is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-17-2020 , 23:21   Re: Warning to the player
Reply With Quote #4

If you already have a plugin that does most of what you want, you'll need to either link to it or attach the .sma here so that someone can better understand what you are asking for and potentially edit it for you to work the way you want.
__________________

Last edited by fysiks; 02-17-2020 at 23:22.
fysiks is offline
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 02-18-2020 , 03:09   Re: Warning to the player
Reply With Quote #5

I just wanted to know how to make it
Perhaps I will give you another example

I get a warning message by saying the word (black) in chat
Well if the player sends this word three times

Send Message (Black)

You will be given 3 times deadline
To quit

Resend message (black)

You will be given 2 times deadline
To quit

Resend message (black)

You will be given 1 times deadline
To quit

If you repeat this word again

Resend message (black)

*Command
*ban player run

Last edited by amirwolf; 02-18-2020 at 03:16.
amirwolf is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 02-18-2020 , 05:58   Re: Warning to the player
Reply With Quote #6

Untested
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Warn System"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"

new const szWords[][] =
{
    
"Black",
    
"White",
    
"Green",
    
"Brown"
};

new 
iWarned[33];

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_clcmd("say""HandleSay");
}

public 
client_disconnect(id)
{
    
iWarned[id] = 0;
}

public 
HandleSay(id)
{
    new 
szArg[20];
    
read_args(szArgcharsmax(szArg))
    
    for(new 
isizeof(szWords); i++)
    {
        if(
containi(szArgszWords[i]))
        {
            
client_print(idprint_chat"You have been warned for saying the word: %s"szWords[i]);
            
iWarned[id]++;
            break;
        }
    }
    
    if(
iWarned[id] == 3)
    {
        new 
szAuthid[35];
        
get_user_authid(idszAuthidcharsmax(szAuthid));
            
        
server_cmd("kick #%d"szAuthid);
    }

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 02-18-2020 , 08:48   Re: Warning to the player
Reply With Quote #7

Quote:
Originally Posted by Napoleon_be View Post
Untested
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Warn System"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"

new const szWords[][] =
{
    
"Black",
    
"White",
    
"Green",
    
"Brown"
};

new 
iWarned[33];

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_clcmd("say""HandleSay");
}

public 
client_disconnect(id)
{
    
iWarned[id] = 0;
}

public 
HandleSay(id)
{
    new 
szArg[20];
    
read_args(szArgcharsmax(szArg))
    
    for(new 
isizeof(szWords); i++)
    {
        if(
containi(szArgszWords[i]))
        {
            
client_print(idprint_chat"You have been warned for saying the word: %s"szWords[i]);
            
iWarned[id]++;
            break;
        }
    }
    
    if(
iWarned[id] == 3)
    {
        new 
szAuthid[35];
        
get_user_authid(idszAuthidcharsmax(szAuthid));
            
        
server_cmd("kick #%d"szAuthid);
    }

That was exactly what I wanted
Thanks big man
amirwolf is offline
Old 02-18-2020, 09:10
amirwolf
This message has been deleted by amirwolf.
Reply


Thread Tools
Display Modes

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 05:08.


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