Help please
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	{
	if(PlayerData[playerid][Muted] == 1)
	{
    if(PlayerData[playerid][Level] >= 4)
    {
    return 1;
    }
	NMC(playerid,"[ NOTICE ] You are still muted !");
	return 0;
	}
Why its not working ?
Reply
#2

oh my god why u try to do lol
Reply
#3

What happens here is that if someone is muted and their level is >= 4 the function stops returning 1 - if someone is muted and the level is below 0 he most likely gets a message (depending on what NMC() does) and the function returns 0.

There are some curly braces missing in the end.

Question is, what`s the result you`re expecting?
Reply
#4

u want avoid to do a command?
Reply
#5

NMC = Notince Message Color is already stocked to avoid SendClientMessage = more time...

I want if a player is muted and his level is bigger then level 4 to be able to speak...

I didnt post all of my script thats why brackets are missing

Compiling is ok.
Reply
#6

if u want avoid to speak u need to add script in "public OnPlayerText(playerid, text[])"
Reply
#7

Right first off:

OnPlayerCommandText is for commands.
OnPlayerText is for normal game chat.

So I`d copy those lines in OnPlayerText and remove them from OnPlayerCommandText.

Can you show the lines of OnPlayerText that cause printing out what a player enters in his chatbox?

Basically you have to copy those lines like this:

Код:
public OnPlayerText(playerid, text[])
{
	if(PlayerData[playerid][Muted] == 1)
	{
		if(PlayerData[playerid][Level] >= 4)
		{
			// HERE SHOULD THE GENERAL OUTPUT LINES BE 
			return 1;
		}
		NMC(playerid,"[ NOTICE ] You are still muted !");
		return 0;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)