need help with helper chat.
#2

try this
PHP код:
CMD:hc(playeridparams[])
{
    if(
PlayerInfo[playerid][pHelper] < || PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playeridCOLOR_GREY"You are not authorized to use this command.");
    if(
isnull(params)) return SendClientMessage(playeridCOLOR_GREY3"[Usage]: /hc [helper chat]");
    if(
PlayerInfo[playerid][pToggleHelper]) return SendClientMessage(playeridCOLOR_GREY"You can't speak in the helper chat as you have it toggled.");
    foreach(new 
Player)
    {
        if(
PlayerInfo[i][pHelper] > && !PlayerInfo[i][pToggleHelper] && PlayerInfo[i][pAdmin] > 0)
        {
            if(
strlen(params) > MAX_SPLIT_LENGTH)
            {
                
SendClientMessageEx(iCOLOR_AQUA"** %s %s: %.*s... **"GetHelperRank(playerid), GetPlayerRPName(playerid), MAX_SPLIT_LENGTHparams);
                
SendClientMessageEx(iCOLOR_AQUA"** %s %s: ...%s **"GetHelperRank(playerid), GetPlayerRPName(playerid), params[MAX_SPLIT_LENGTH]);
            }
            else
            {
                
SendClientMessageEx(iCOLOR_AQUA"** %s %s: %s **"GetHelperRank(playerid), GetPlayerRPName(playerid), params);
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
need help with helper chat. - by RODELA - 26.04.2018, 13:21
Re: need help with helper chat. - by IceBilizard - 26.04.2018, 13:24
Re: need help with helper chat. - by RODELA - 26.04.2018, 13:40
Re: need help with helper chat. - by Bruno13 - 26.04.2018, 13:45
Re: need help with helper chat. - by IceBilizard - 26.04.2018, 13:57
Re: need help with helper chat. - by RODELA - 26.04.2018, 14:09
Re: need help with helper chat. - by RODELA - 26.04.2018, 14:13
Re: need help with helper chat. - by IceBilizard - 26.04.2018, 14:53
Re: need help with helper chat. - by RODELA - 26.04.2018, 16:00

Forum Jump:


Users browsing this thread: 1 Guest(s)