Jump to content
  • 0

Problema REPORT/AJUTOR


d@rK

Question

Cand dau /report(pt. admini) sau /ajutor(pt. helperi) in loc sa scrie textul care il scrii, apare un numar...

De exemplu: "/report am nevoie de un admin" si la admini apare "REPORT from x: 123" 123 in loc de mesaj... :(

PAWNO:

1./report:

[pawn]if(strcmp(cmd, "/report", true) == 0)

    {

      if(IsPlayerConnected(playerid))

      {

        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;

            if(!strlen(result))

            {

                SendClientMessage(playerid, COLOR_GRAD2, "Use: /report [text]");

                return 1;

            }

            if(rTime[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "{FF6347}[bloodZone]: {FFFFFF}Asteapta {FFFF00}30 secunde {FFFFFF}pentru urmatorul report {FFFF00}!");

            format(string, sizeof(string), "{228B22}[REPORT] {FF1493}%s{FFF0F5} ({FF1493}ID: %d{FFF0F5}){FF0000}: {FF0000}%d", sendername,playerid, (result));

            ABroadCast(COLOR_RED,string,1);

            SendClientMessage(playerid, COLOR_YELLOW, "{FFFF00}Raportul tau a fost trimis la Adminii {40E0D0}Blood Zone.");

            rTime[playerid] = 1;

            SetTimerEx("Report", 30000, 0, "%d", playerid);

      }

      return 1;

    }[/pawn]

PAWNO:

2. /ajutor

[pawn]if(strcmp(cmd, "/ajutor", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

    if(PlayerInfo[playerid][pHMuted] == 1)

{

SendClientMessage(playerid, TEAM_CYAN_COLOR, "Ai fost redus la tacere, nu poti vorbi!");

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;

if(!strlen(result))

{

SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ajutor [text]");

return 1;

}

if(ajTime[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "{FF6347}[bloodZone]: {FFFFFF}Asteapta {FFFF00}30 secunde {FFFFFF}pentru urmatorul ajutor {FFFF00}!");

format(string, sizeof(string), "{228B22}[AJUTOR] {FF1493}%s {F0FFF0}({FF1493}ID: %d{F0FFF0}){FFD700}: {7CFC00}%d", sendername,playerid, (result));

HBroadCast(COLOR_YELLOW,string);

SendClientMessage(playerid, COLOR_YELLOW, "{FFFF00}Cererea de ajutor a fost trimisa la Agentii {40E0D0}Blood Zone.");

ajTime[playerid] = 1;

            SetTimerEx("Ajutor", 30000, 0, "%d", playerid);

    }

    return 1;

}[/pawn]

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

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.