Raised This Month: $ Target: $400
 0% 

Solved PrintToChat Flooding


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
imN1CK
Junior Member
Join Date: Oct 2018
Location: Brazil
Old 10-03-2018 , 00:29   PrintToChat Flooding
Reply With Quote #1

Code:
public void OnPluginStart()
{
	RegConsoleCmd ("sm_nick", Command_nick);
}

public Action Command_nick(client , args)
{
	if (client){
		ClientCommand (client, "sm_nick");
		PrintToChat(client, "\x01 Nick lindo");
	}
	return Plugin_Handled;
}
when i say !nick in chat the plugin start flooding the message but i want to send only 1 message per command
what im doing wrong?

sorry for the bad english

Last edited by imN1CK; 10-03-2018 at 01:08.
imN1CK is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 10-03-2018 , 00:34   Re: PrintToChat Flooding
Reply With Quote #2

If you post to the right forum area, maybe you can get your answer.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 10-03-2018 , 00:37   Re: PrintToChat Flooding
Reply With Quote #3

Why are you doing ClientCommand?
__________________
ddhoward is offline
imN1CK
Junior Member
Join Date: Oct 2018
Location: Brazil
Old 10-03-2018 , 00:40   Re: PrintToChat Flooding
Reply With Quote #4

'cause im not a dev expert and im learning some codes

Last edited by imN1CK; 10-03-2018 at 00:42.
imN1CK is offline
imN1CK
Junior Member
Join Date: Oct 2018
Location: Brazil
Old 10-03-2018 , 00:41   Re: PrintToChat Flooding
Reply With Quote #5

what can i use instead of ClientCommand?
imN1CK is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 10-03-2018 , 00:43   Re: PrintToChat Flooding
Reply With Quote #6

Why use anything there? What are you trying to do?
__________________
ddhoward is offline
imN1CK
Junior Member
Join Date: Oct 2018
Location: Brazil
Old 10-03-2018 , 00:45   Re: PrintToChat Flooding
Reply With Quote #7

im trying to create a code like

when a player say !nick send a message for him
i think is so easy but idk im doing wrong
imN1CK is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 10-03-2018 , 00:49   Re: PrintToChat Flooding
Reply With Quote #8

Quote:
Originally Posted by imN1CK View Post
im trying to create a code like

when a player say !nick send a message for him
i think is so easy but idk im doing wrong
Think about what each line is doing. What is the purpose of the ClientCommand line? Why not just delete that line?
__________________
ddhoward is offline
imN1CK
Junior Member
Join Date: Oct 2018
Location: Brazil
Old 10-03-2018 , 00:54   Re: PrintToChat Flooding
Reply With Quote #9

yes, i did deleted the line and its worked
ty ;)
imN1CK is offline
Old 10-03-2018, 00:57
imN1CK
This message has been deleted by imN1CK.
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 23:02.


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