Whats wrong with my chats?
#1

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.
Reply
#2

Sorry for the double post. But I just realized, the chats aren't even working on my backup game mode.
Reply
#3

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
Reply
#4

It didn't work.

My backup GM, which doesn't even have the /mute command in it, the chats don't work either.
Reply
#5

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
Reply
#6

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;
}
Reply
#7

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.
Reply
#8

sorry my mbl messed so psted twice.
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)