[Ajuda] Carandiru Tempo e Motivo
#1

Galera Jб Tentei De Todos os Geitos, Nгo Funfo
Quero Deichar o /carandiru da Seguinte Forma:

AdmCmd: Admin Tal_Staff, Prendeu Tal_Player Por 180 Minutos No Carandiru, Motivo: /q Para Nao Ser Preso

So Que o Meu nn Tem Isso So Mostra Mensagem Pro Player, No SedClient...
* Admin: Tal Te Prendeu No Carandiru

e

to Loco pra Deixar:

AdmCmd: Admin Tal_Staff, Prendeu Tal_Player Por 180 Minutos No Carandiru, Motivo: /q Para Nao Ser Preso

So Que Nao Consigo,Me AJudem


pawn Код:
if(strcmp(cmd, "/carandiru",true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new tempo[20];
            new tempo2;
            if(PlayerInfo[playerid][pAdmin] < 2)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo esta autorizado para usar este comando!");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            tempo = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /carandiru [id] [ Tempo ]");
                return 1;
            }
            if(!strlen(tempo))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /carandiru [id] [ Tempo ]");
                return 1;
            }
            if(PlayerInfo[giveplayerid][pAdmin] >= 1339 && PlayerInfo[playerid][pAdmin] < 1338)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar carandiru para um Admin Dono !");
                return 1;
            }
            if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            tempo2 = strval(tempo);
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    format(string, sizeof(string), "* Vocк Colocou o(a) %s No Carandiru.", giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTRED, string);
                    if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
                    {
                        SendClientMessage(giveplayerid, COLOR_LIGHTRED, "* Vocк foi colocado no Carandiru Pelo Admin Chuck_Norris.");
                    }
                    else
                    {
                        format(string, sizeof(string), "* Vocк foi colocado no Carandiru Pelo Admin %s.", sendername);
                        SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
                    }
                    GameTextForPlayer(giveplayerid, "~b~Bem Vindo ao ~n~~r~Carandiru", 5000, 3);
                    ResetPlayerWeaponsEx(giveplayerid);
                    WantedPoints[giveplayerid] = 0;
                    SetPlayerWantedLevel(giveplayerid, 0);
                    PlayerInfo[giveplayerid][pJailed] = 2;
                    PlayerInfo[giveplayerid][pJailTime] = tempo2 * 60;
                    SetPlayerPos(giveplayerid, 107.2300,1920.6311,18.5208);
                    SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   O jogador estб offline !");
                return 1;
            }
        }
        return 1;
    }
Reply
#2

pawn Код:
if(strcmp(cmd, "/carandiru",true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new tempo[20];
            new tempo2;
            if(PlayerInfo[playerid][pAdmin] < 2)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo esta autorizado para usar este comando!");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            tempo = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /carandiru [id] [ Tempo ]");
                return 1;
            }
            if(!strlen(tempo))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /carandiru [id] [ Tempo ]");
                return 1;
            }
            if(PlayerInfo[giveplayerid][pAdmin] >= 1339 && PlayerInfo[playerid][pAdmin] < 1338)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar carandiru para um Admin Dono !");
                return 1;
            }
            if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            tempo2 = strval(tempo);
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    format(string, sizeof(string), "* Vocк Colocou o(a) %s No Carandiru.", giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTRED, string);
                    if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
                    {
                        SendClientMessage(giveplayerid, COLOR_LIGHTRED, "* Vocк foi colocado no Carandiru Pelo Admin Chuck_Norris.");
                    }
                    else
                    {
                        format(string, sizeof(string), "O admin %s colocou %s no carandiru. Motivo: %s", sendername, giveplayer, result);
                        SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
                    }
                    GameTextForPlayer(giveplayerid, "~b~Bem Vindo ao ~n~~r~Carandiru", 5000, 3);
                    ResetPlayerWeaponsEx(giveplayerid);
                    WantedPoints[giveplayerid] = 0;
                    SetPlayerWantedLevel(giveplayerid, 0);
                    PlayerInfo[giveplayerid][pJailed] = 2;
                    PlayerInfo[giveplayerid][pJailTime] = tempo2 * 60;
                    SetPlayerPos(giveplayerid, 107.2300,1920.6311,18.5208);
                    SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   O jogador estб offline !");
                return 1;
            }
        }
        return 1;
    }
Caso nгo funfe tem de saber qual e a new do result, e outros !
Reply
#3

pawn Код:
if(strcmp(cmd, "/carandiru",true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new tempo[20];
            new tempo2;
            if(PlayerInfo[playerid][pAdmin] < 2)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo esta autorizado para usar este comando!");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            tempo = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /carandiru [id] [ Tempo ]");
                return 1;
            }
            if(!strlen(tempo))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /carandiru [id] [ Tempo ]");
                return 1;
            }
            if(PlayerInfo[giveplayerid][pAdmin] >= 1339 && PlayerInfo[playerid][pAdmin] < 1338)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar carandiru para um Admin Dono !");
                return 1;
            }
            if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            tempo2 = strval(tempo);
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    format(string, sizeof(string), "* Vocк Colocou o(a) %s No Carandiru.", giveplayer);
                    SendClientMessage(playerid, COLOR_LIGHTRED, string);
                    if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
                    {
                        format(string, sizeof(string), "AdmCmd: Admin %s, Prendeu %s Por %d Minutos No Carandiru, Motivo: /q Para Nao Ser Preso", sendername,giveplayer,tempo);
                        SendClientMessageToAll(-1,string);
                    }
                    else
                    {
                        format(string, sizeof(string), "* Vocк foi colocado no Carandiru Pelo Admin %s.", sendername);
                        SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
                    }
                    GameTextForPlayer(giveplayerid, "~b~Bem Vindo ao ~n~~r~Carandiru", 5000, 3);
                    ResetPlayerWeaponsEx(giveplayerid);
                    WantedPoints[giveplayerid] = 0;
                    SetPlayerWantedLevel(giveplayerid, 0);
                    PlayerInfo[giveplayerid][pJailed] = 2;
                    PlayerInfo[giveplayerid][pJailTime] = tempo2 * 60;
                    SetPlayerPos(giveplayerid, 107.2300,1920.6311,18.5208);
                    SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   O jogador estб offline !");
                return 1;
            }
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)