Jump to content
  • 0

Problema /hc


BaD_bOy_MD

Question

Poate folosi orice player /hc dar el nu vede chatul helperilor si as vrea sa le dea mesaj ca nu esti helper

if(strcmp(cmd, "/hc", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMuted] == 1)
            {
                SendClientMessage(playerid, COLOR_WHITE, "Nu poti scrie in chat deoarece ai primit mute!");
                return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            result[0] = toupper(result[0]);
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_SERVER, "USAGE:{FFFFFF} /hc [text]");
                return 1;
            }
            new arank[256];
            if(PlayerInfo[playerid][pAdmin] == 1) arank = "Trial Moderator";
            else if(PlayerInfo[playerid][pAdmin] == 2) arank = "Moderator";
            else if(PlayerInfo[playerid][pAdmin] == 3) arank = "Global Moderator";
            else if(PlayerInfo[playerid][pAdmin] == 4) arank = "Administrator";
            else if(PlayerInfo[playerid][pAdmin] == 5) arank = "Co-Owner";
            else if(PlayerInfo[playerid][pAdmin] == 6) arank = "Owner";
            else if(PlayerInfo[playerid][pAdmin] == 7) arank = "Fondator";
            if(PlayerInfo[playerid][pHelper] >= 1)
            {
                format(string, sizeof(string), "[Helper %d] %s: %s", PlayerInfo[playerid][pHelper], sendername, result);
                HBroadCast(COLOR_YELLOW, string);
            }
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i) && PlayerInfo[pAdmin] >= 6)
                {
                    format(string, 256, "(/hc): Helper %s: %s", GetName(playerid), (result));
                    SCM(i, COLOR_YELLOW, string);
                }
            }
        }
        return 1;

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
Acum 12 ore, AddisoN a spus:

Inainte de a face verificarea sa vezi daca are mute trebuie sa faci cva de genu

If (PlayerInfo[playerid][pHelper]==0) return sendclientmessage (playeris,culoare,mesaj);

Playeri simpli tot au acces...... dar ei nu vad ce scriu dar admini/helperi da...

Edited by BaD_bOy_MD
Link to comment
Share on other sites

  • 0
On 29.01.2017 at 10:18 PM, BaD_bOy_MD said:

Atunci Helperi si playeri simpli nu pot iar admini pot

Trebuie sa faci verificarea in acea iteratie (for) sau poti sa verifici daca nu sunt admini sau helperi (== 0) si sa pui un return 1.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.