24.03.2012, 06:45
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
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;
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) == 0 || strcmp(cmd, "/ht", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if ((noht))
{
SendClientMessage(playerid, COLOR_GRAD2, " the helper chanel has been disabled by lead helper");
return 1;
}
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, "USAGE: (/h)elp(t) [helper chat chat]");
return 1;
}
format(string, sizeof(string), "*** %s *** %s", PlayerInfo[playerid][pHelName], result);
if (PlayerInfo[playerid][pHelper] >= 1)
{
SendHelperMessage(0x40808096, string);
}
//printf("Helper %s: %s", sendername, result);
}
return 1;
}
if(strcmp(cmd, "/noht", true) == 0)
{
if (PlayerInfo[playerid][pHelper] >= 3 && (!noht))
{
noht = 1;
if(stats)
{
realchat = 1;
}
BroadCast(COLOR_GRAD2, " helper chat channel disabled by lead helper");
}
else if (PlayerInfo[playerid][pAdmin] >= 3 && (noht))
{
noht = 0;
if(stats)
{
realchat = 0;
}
BroadCast(COLOR_GRAD2, " helper chat channel enabled by lead helper");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
return 1;
}
I have added noht on top
new noht = 1;