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

eu queria criar um comando igual dos cops, de /megafone que nos usamos como /m. numero da org do detran e 26. ajdua ae...
Reply
#2

posta o comando
Reply
#3

mais no comando atual
pede pra ele batercartao, eu quero sem bater cartao
Reply
#4

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;
}
if(OnDuty[playerid] != 1)
{
MSGPLAYER(playerid, COLOR_GREY, " Vocк nгo Bateu o cartгo!");
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
#5

eu so quero pra detran e sem batercartao, pq ai pede pra ele bater o cartao, eu quero so pra detran
numero da org 26
Reply
#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
#7

cara meu comando ta assim
entende
eu quero, coloca um comando desse pra detran, igual esse so oq muda, e que no lugar de isacop, coloca o numero da org detran, eu quero so pra detran entedeu?
Reply
#8

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)) {
        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 (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);
        }
       
        if (!IsACop(playerid)) {
            MSGPLAYER(playerid, COLOR_GREY, " Vocк nгo й um policial!");
            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);
            }
            printf("%s", string);
        }
        else {
            MSGPLAYER(playerid, COLOR_GRAD2, " Vocк nгo faz parte de nenhuma equipe !");
            return 1;
        }
    }
    return 1;
}
Reply
#9

mais e um so pra detran, n pra policia civil pm n e pra esse so pra detran, tem como, igual esse, mais so pra detran
Reply
#10

Quote:
Originally Posted by Junior_Cunha
Посмотреть сообщение
mais e um so pra detran, n pra policia civil pm n e pra esse so pra detran, tem como, igual esse, mais so pra detran
pawn Код:
if (strcmp(cmd, "/dmegafone", true) == 0 || strcmp(cmd, "/d", true) == 0) {
    if (PlayerInfo[playerid][pMuted] == 1)return MSGPLAYER(playerid, TEAM_CYAN_COLOR, "Vocк nгo pode falar, pois foi calado");
    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)) { MSGPLAYER(playerid, COLOR_GRAD2, "USE: (/m)egafone [megaphone chat]"); return 1; }
        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);
        }
        else { MSGPLAYER(playerid, COLOR_GRAD2, " Vocк nгo faz parte de nenhuma equipe !"); return 1;}
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)