[Pedido] comando /m para o detran ( numero da org detran : 26)
#6

Sem Double/Triple-post.

pawn Код:
if (strcmp(cmd, "/megafone", true) == 0 || strcmp(cmd, "/m", true) == 0) {
    if (PlayerInfo[playerid][pMuted] == 1) {
        MSGPLAYER(playerid, TEAM_CYAN_COLOR, "Vocк nгo pode falar, pois foi calado");
        return 1;
    }
    if (IsPlayerConnected(playerid)) {
        if (!IsACop(playerid)) {
            MSGPLAYER(playerid, COLOR_GREY, " Vocк nгo й um policial!");
            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)) {
            MSGPLAYER(playerid, COLOR_GRAD2, "USE: (/m)egafone [megaphone chat]");
            return 1;
        }
        if (gTeam[playerid] == 2 || IsACop(playerid)) {
            if (PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1) {
                format(string, sizeof(string), "Policial Militar %s< %s", sendername, result);
                ProxDetector(60.0, playerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLO R_YELLOW, COLOR_YELLOW);
            }
            else if (PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pLider] == 2) {
                format(string, sizeof(string), "B.O.P.E %s< %s", sendername, result);
                ProxDetector(60.0, playerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLO R_YELLOW, COLOR_YELLOW);
            }
            else if (PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3) {
                format(string, sizeof(string), "Exйrcito %s< %s", sendername, result);
                ProxDetector(60.0, playerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLO R_YELLOW, COLOR_YELLOW);
            }
            else if (IsAGOV(playerid)) {
                format(string, sizeof(string), "Governo %s< %s", sendername, result);
                ProxDetector(60.0, playerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLO R_YELLOW, COLOR_YELLOW);
            }
            else if (PlayerInfo[playerid][pMembro] == 16 || PlayerInfo[playerid][pLider] == 16) {
                format(string, sizeof(string), "Policia Civil %s< %s", sendername, result);
                ProxDetector(60.0, playerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLO R_YELLOW, COLOR_YELLOW);
            }
            else if (PlayerInfo[playerid][pMembro] == 11 || PlayerInfo[playerid][pLider] == 11) {
                format(string, sizeof(string), "Policia Federal %s< %s", sendername, result);
                ProxDetector(60.0, playerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLO R_YELLOW, COLOR_YELLOW);
            }
            else if (PlayerInfo[playerid][pMembro] == 26 || PlayerInfo[playerid][pLider] == 26) {
                format(string, sizeof(string), "D.E.T.R.A.N %s< %s", sendername, result);
                ProxDetector(60.0, playerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLO R_YELLOW, COLOR_YELLOW);
            }
            printf("%s", string);
        }
        else {
            MSGPLAYER(playerid, COLOR_GRAD2, " Vocк nгo faz parte de nenhuma equipe !");
            return 1;
        }
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)