Problem with helper chat HELP!!
#1

Well i was making a helper chat with /noht means when lead helper do /noht, all helper cant talk in/ht chat.
It works fine with the /noht but the thing is when the helperchat is enable only level 1 helper can chat in helperchat
Level 2 and three cant chat. i dont know why. I compile it well. Please check my mistake thank you
PHP код:
    if(strcmp(cmd"/helpt"true) == || strcmp(cmd"/ht"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
        if ((
noht))
        {
            
SendClientMessage(playeridCOLOR_GRAD2"   the helper chanel has been disabled by lead helper");
            return 
1;
        }
        if(
Mute[playerid] == 1)
            {
                
SendClientMessage(playeridTEAM_CYAN_COLOR"   You can't speak, you have been silenced !");
                return 
1;
            }
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
GiveNameSpace(sendername);
            new 
length strlen(cmdtext);
            while ((
idx length) && (cmdtext[idx] <= ' '))
            {
                
idx++;
            }
            new 
offset idx;
            new 
result[128];
            while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
            {
                
result[idx offset] = cmdtext[idx];
                
idx++;
            }
            
result[idx offset] = EOS;
            if(!
strlen(result))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USAGE: (/h)elp(t) [helper chat chat]");
                return 
1;
            }
            
format(stringsizeof(string), "*** %s *** %s"PlayerInfo[playerid][pHelName], result);
            if (
PlayerInfo[playerid][pHelper] >= 1)
            {
            
SendHelperMessage(0x40808096string);
            }
            
//printf("Helper %s: %s", sendername, result);
        
}
        return 
1;
    }
    
    if(
strcmp(cmd"/noht"true) == 0)
    {
        if (
PlayerInfo[playerid][pHelper] >= && (!noht))
        {
            
noht 1;
            if(
stats)
            {
                
realchat 1;
            }
            
BroadCast(COLOR_GRAD2"   helper chat channel disabled by lead helper");
        }
        else if (
PlayerInfo[playerid][pAdmin] >= && (noht))
        {
            
noht 0;
            if(
stats)
            {
                
realchat 0;
            }
            
BroadCast(COLOR_GRAD2"   helper chat channel enabled by lead helper");
        }
        else
        {
            
SendClientMessage(playeridCOLOR_GRAD1"   you are not authorized to use that command!");
        }
        return 
1;
    } 
When i compile no errors only when ingame lead helper and level 2 helper cant chat i helperchat. Only level 1 helper can. WHy is that so?
I have added noht on top
new noht = 1;
Reply
#2

Here's my command for example, godfather as yours, only that I edited it.
pawn Код:
if(strcmp(cmd, "/supporterchat", true) == 0 || strcmp(cmd, "/spt", true) == 0) {
        if(IsPlayerConnected(playerid)) {
            if(Mute[playerid] == 1) {
                SendClientMessage(playerid, TEAM_CYAN_COLOR, "You can't speak, you have been silenced !");
                return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            GiveNameSpace(sendername);
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' ')) {
                idx++;
            }
            new offset = idx;
            new result[128];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result)) {
                SendClientMessage(playerid, COLOR_GRAD2, "[{EE5555}USAGE{FFFFFF}]: /spt [supporter chat]");
                return 1;
            }
            format(string, sizeof(string), "*Supporter %s: %s", sendername, result);
            if (PlayerInfo[playerid][pHelper] >= 1) {
                SendHelperMessage(0x40808096, string);
            }
        }
        return 1;
    }
Reply
#3

Yes i have this script but i edited it and add levels to helper. And i want to add noht so all helper cant chat in /noht. It works but when noht is enable only helper can chat. level 2 and lead helper cant chat why?
Reply
#4

PlayerInfo[playerid][pHelper] >= 3

Change to

PlayerInfo[playerid][pAdmin] >= 3

It'll should fix it I guess.
Reply
#5

Well still the same. Cant find any solutions.
Reply
#6

Just rebuild the command then.
Reply
#7

Well i did rebuild new one. But still the same dont know why?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)