Whats wrong with my chats? -
rangerxxll - 11.03.2012
Hello. Just recently, this has started to happen. Every time I do /v, /a, /b or /t it says "SERVER: Unknown Command" And it just started to happen today. It was all working fine yesterday. If you need to do, /v is vip, /a is admin, /t is team... and /b is for my beta testers. I "think" my new /mute commands messed it up, but I don't know how, and I don't know if thats the truth. Here's all the code you need, any help would be GREATLY appreciated.
EDIT: Deleting code, problem fixed. Thanks everyone.
Re: Whats wrong with my chats? -
rangerxxll - 11.03.2012
Sorry for the double post. But I just realized, the chats aren't even working on my backup game mode.
Re: Whats wrong with my chats? -
new121 - 11.03.2012
pawn Код:
public OnPlayerText(playerid, text[])
{
if(PlayerInfo[playerid][pMute] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You're currently muted.");
return 0;
}
else
{
new string[128], name[24];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string)," %s:%s ", name, text);
}
return 1;
}
Try that
Re: Whats wrong with my chats? -
rangerxxll - 11.03.2012
It didn't work.
My backup GM, which doesn't even have the /mute command in it, the chats don't work either.
Re: Whats wrong with my chats? -
new121 - 11.03.2012
pawn Код:
public OnPlayerText(playerid, text[])
{
if(PlayerInfo[playerid][pMute] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You're currently muted.");
return 0;
}
else// the player isn't muted
{
new string[128], name[24];//variables for our string, and a variable to hold the playername
GetPlayerName(playerid, name, sizeof(name));// gets the players name and stores it to variable name
format(string, sizeof(string)," %s:%s ", name, text); //formats the string
SendClientMessageToAll(0xFFFFFFAA, string);
}
return 1;
}
Try that
Re: Whats wrong with my chats? -
Shabi RoxX - 11.03.2012
You must return 1 ..... U r returning 0 that neans false.
pawn Код:
public OnPlayerText(playerid, text[])
{
if(PlayerInfo[playerid][pMute] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You're currently muted.");
return 1;
}
Re: Whats wrong with my chats? -
rangerxxll - 11.03.2012
Would that even effect the chats? The chats are based off a command, /t, /v, /a, /b etc.
EDIT: Still doesn't work.
I even deleted my /ini files, so it could rebuild. But it still doesn't work.
Re: Whats wrong with my chats? -
Shabi RoxX - 11.03.2012
sorry my mbl messed so psted twice.
Re: Whats wrong with my chats? -
rangerxxll - 11.03.2012
Quote:
Originally Posted by Shabi RoxX
you must return 1 not 0 , try this.
pawn Код:
public OnPlayerText(playerid, text[]) { if(PlayerInfo[playerid][pMute] == 1) { SendClientMessage(playerid, COLOR_RED, "You're currently muted."); return 1; }
|
I already did that.