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

"say" and "say_team"


Post New Thread Closed Thread   
 
Thread Tools Display Modes
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 04-09-2010 , 13:56   Re: "say" and "say_team"
#21

Quote:
Originally Posted by fysiks View Post
You need to stop coding becuase we have answered your question and it is extremely easy. If you can't do it from what we have told you then we obviously are never going to be able to help you.

If you are not going to give up, I suggest you read Bugsy's post and you can test it yourself. It's really not that hard.
Fysiks sorry but i do not understand yet

I already own the code as i gave exolent, look:

PHP Code:
if ( arg[0] == '.'  || arg[0] == '!') { client_cmd(id,arg); return PLUGIN_CONTINUE; } 
    return 
PLUGIN_CONTINUE
But now i want bolckear 1 single command nothing but not to be displayed on the screen, which is this:

PHP Code:
public cmd_votekick(id,level,cid)
{
    
    if (!
cmd_access(idlevelcid2) ) return pug_msg_tmp_empty(id,"PUG_CMD_NOTALLOWED")
    
    
//now check if player used command in last 5 minutes
    
if(g_last_use[id] + 300 get_systime())
        return 
pug_msg_tmp_empty(id,"PUG_CMD_NOTALLOWED2")

    
read_argv(1,pug_votekick_name,31)

    new 
target cmd_target(id,pug_votekick_name,1)
    if(!
target) return pug_msg_tmp_empty(id,"PUG_CMD_NOTARGET")
    else 
get_user_name(target,pug_votekick_name,31)
    
    if(
read_argc ( ) > 2read_argv(2,pug_votekick_razon,49)
    else 
formatex(pug_votekick_razon,49,"Ninguna")
    
    
votekick_start()
    
    
//at the end save time when command was used
    
g_last_use[id] = get_systime()
    return 
PLUGIN_HANDLED;
}

public 
votekick_start()
{
    if(
pug_voting) { set_task(get_pcvar_float(pug_cvar_vote_time),"votekick_start",100 pug_votekick_menu); return; }

    
pug_voting 1;
    
arrayset(pug_voted,0,33)
    
arrayset(pug_votekick_votes,0,3)

    static 
votename[100]
    
formatex(votename,99,"VoteKick: %s",pug_votekick_name)

    
menu_setprop(pug_votekick_menu,MPROP_TITLE,votename)
    
pug_display_menu_all(pug_votekick_menu)

    
client_print(0,print_chat,"",pug_headerLANG_PLAYER"PUG_VOTE_START""kick player");
    
console_print(0,"%s %L",pug_headerLANG_PLAYER"PUG_VOTE_START""kick player");

    
set_task(get_pcvar_float(pug_cvar_vote_time),"votekick_end",100 pug_votekick_menu)
}

public 
votekick_end()
{
    
pug_cancel_menu()
    
votekick_count()

    
pug_voting 0;
    
remove_task 100 pug_votekick_menu )

All are shown on the screen and this very well but i want you do not show this....
flamin is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-09-2010 , 14:08   Re: "say" and "say_team"
#22

Quote:
Originally Posted by flamin View Post
PHP Code:
if ( arg[0] == '.'  || arg[0] == '!') { client_cmd(id,arg); return PLUGIN_CONTINUE; } 
    return 
PLUGIN_CONTINUE
First of all, this code is completely wrong. I already told you why it is wrong. And, we told you how to prevent the chat from being shown.

Quote:
Originally Posted by flamin View Post
But now i want bolckear 1 single command nothing but not to be displayed on the screen, which is this:

PHP Code:
public cmd_votekick(id,level,cid)
{
   . . . 

All are shown on the screen and this very well but i want you do not show this....
This command, as I have already told you, is NOT a chat command. The only thing in this command that shows to everybody is the client_print(0, . . .) and the console_print(0, . . .); remove those lines I guess. AND it doens't show anything about who executed that command.
__________________
fysiks is online now
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 04-09-2010 , 14:30   Re: "say" and "say_team"
#23

Look as i have placed:

PHP Code:
public handle_say(id)
{
    static 
arg[192]
    
read_args(arg,191)
    
remove_quotes(arg)

    if ( 
arg[0] == '.'  || arg[0] == '!') { client_cmd(id,arg); return PLUGIN_CONTINUE; }
    return 
PLUGIN_HANDLED;

The command this so-called in this way:

PHP Code:
public plugin_init()
{
    
register_pug_admincmd("votekick","cmd_votekick",_,"< nombre > - votekick")
}

public 
cmd_votekick(id,level,cid)
{
    
    if (!
cmd_access(idlevelcid2) ) return pug_msg_tmp_empty(id,"PUG_CMD_NOTALLOWED")
    
    
//now check if player used command in last 5 minutes
    
if(g_last_use[id] + 300 get_systime())
        return 
pug_msg_tmp_empty(id,"PUG_CMD_NOTALLOWED2")

    
read_argv(1,pug_votekick_name,31)

    new 
target cmd_target(id,pug_votekick_name,1)
    if(!
target) return pug_msg_tmp_empty(id,"PUG_CMD_NOTARGET")
    else 
get_user_name(target,pug_votekick_name,31)
    
    if(
read_argc ( ) > 2read_argv(2,pug_votekick_razon,49)
    else 
formatex(pug_votekick_razon,49,"Ninguna")
    
    
votekick_start()
    
    
//at the end save time when command was used
    
g_last_use[id] = get_systime()
    return 
PLUGIN_HANDLED;

I leave a screenshot of what i would eliminate the chat: I do not want show in the chat what i have written
Attached Thumbnails
Click image for larger version

Name:	say.JPG
Views:	121
Size:	5.0 KB
ID:	63403  

Last edited by flamin; 04-09-2010 at 14:32.
flamin is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-09-2010 , 14:51   Re: "say" and "say_team"
#24

First of all, that won't work. Your votekick command DOES NOT start with a ".".

PHP Code:
public handle_say(id)
{
    static 
arg[192]
    
read_args(arg,191)
    
remove_quotes(arg)

    if ( 
arg[0] == '.'  || arg[0] == '!')
    {
        
client_cmd(id,arg)
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE


Learn to format your code this way, it makes thing 1000% easier. Indentation will help you find errors.
__________________
fysiks is online now
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 04-09-2010 , 15:00   Re: "say" and "say_team"
#25

Yes the command starts just as i have placed .votekick "name player", The code that i beam given, i have implemented but now I am not shows the other commands in the chat room, i just wanted that i do not show the votekick
flamin is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-09-2010 , 15:02   Re: "say" and "say_team"
#26

Then add another condition to check for it. It's not that hard. Do it yourself.
__________________
fysiks is online now
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 04-09-2010 , 15:22   Re: "say" and "say_team"
#27

I have already removed several commands of the chat

I have removed from this way:

PHP Code:
public plugin_init()
{
   
register_clcmd("say .votemap","cmd_votemap",PUG_CMD_LVL,"MAP")

I have removed the chat .votekick, But the command served is putting .votekick "name player", to send .votekick Psycho if it comes out on the screen which is what i wish that do not show on the screen

What i have placed in plugin_init in this way:

PHP Code:
register_clcmd("say .votekick","cmd_votekick",_,"< nombre > - votekick"
As i can fix it?
flamin is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-09-2010 , 16:20   Re: "say" and "say_team"
#28

flamin please read through the scripting tutorials on the forum, you have been asking beginner level questions for a while now. Not trying to be mean or anything but you should spend some time to learn instead of asking others to write and or fix your scripts.
__________________
Bugsy is offline
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 04-09-2010 , 18:28   Re: "say" and "say_team"
#29

only need to fix this piece of code, I know I have to read the tutorials but have not had time since study (university) and also work and I have little time
flamin is offline
flamin
BANNED
Join Date: Jul 2009
Location: Los Teques
Old 04-10-2010 , 11:17   Re: "say" and "say_team"
#30

Quote:
Originally Posted by flamin View Post
only need to fix this piece of code, I know I have to read the tutorials but have not had time since study (university) and also work and I have little time
you can help me?
flamin is offline
Closed Thread



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 19:24.


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