[Ajuda]Comando /arrastar bugado.
#1

Ei gente alguem poderia me ajudar com o codigo abaixo, pois eu digito /arrastar e id e ele nгo arrasta o player para dentro do carro, se puderem me ajudar eu agradeзo, pois os cops do meu servidor estгo enfrentando problemas na hora de prender os meliantes obrigado para quem ajudar.

Cуdigo:

//>-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
pawn Код:
if(strcmp(cmd, "/arrastar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(!IsACop(playerid))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo й um Cop!");
                return 0x01;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /arrastar [ID/ParteDoNome]");
                return 0x01;
            }
            new newcar = GetPlayerVehicleID(playerid);
            new playa;
            playa = ReturnUser(tmp);
            if(IsAPoliciaCivilCar(newcar) || IsAROTAMsCar(newcar) || IsAPFCar(newcar) || IsAExCar(newcar) || IsACopCar(newcar))
            {
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        new Float:x, Float:y, Float:z;
                        GetPlayerPos(playa,x,y,z);
                        if(IsPlayerInRangeOfPoint(playerid, 5, x, y, z))
                        {
                            PutPlayerInVehicle(playa,newcar,2);
                            GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                            format(string, sizeof(string), "%s colocou %s no camburгo.", sendername ,giveplayer);
                            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GREY, "Jogador nгo estб prуximo a vocк.");
                        }
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб em um veнculo policial!");
            }
        }
        return 0x01;
    }
//>-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Reply
#2

Veja o meu:
pawn Код:
if (strcmp(cmd, "/arrastar", true) == 0)
    {
        new car;
        if(IsPlayerConnected(playerid))
        {
            if(IsACop(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "USE: /arrastar [id]");
                    return true;
                }
                if(!IsPlayerInAnyVehicle(playerid))
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo estб em um Veiculo !");
                    return true;
                }
                //giveplayerid = strval(tmp);
                giveplayerid = ReturnUser(tmp);
                if(!IsPlayerInAnyVehicle(giveplayerid))
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "   O Jogador estб em um Veiculo !");
                    return 1;
                }
                if(PlayerCuffedTime[giveplayerid] <= 0)
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo pode arrastar e algemar pessoas que nгo estгo Imobilizadas!");
                    return 1;
                }
                if(giveplayerid == playerid)
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo pode se arrastar e algemar!");
                    return 1;
                }
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        car = GetPlayerVehicleID(playerid);
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        format(string, sizeof(string), "* Vocк foi arrastado e algemado pelo: %s.", sendername);
                        SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* Vocк arrastou e algemou %s.", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* %s arrastou e algemou %s, para nao fugir.", sendername ,giveplayer);
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        GameTextForPlayer(giveplayerid, "~r~Algemado", 2500, 3);
                        PutPlayerInVehicle(giveplayerid, car, 3);
                        TogglePlayerControllable(giveplayerid, 0);
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "   Este Jogador nгo estб ativo !");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo й Policial !");
            }
        }
        return true;
    }
Use como base
Reply
#3

vlw +rep para tu.
Reply
#4

Quote:
Originally Posted by Matheus_Ecko
Посмотреть сообщение
vlw +rep para tu.
Disponha
Reply
#5

mano eu tentei mais ta bug o sistema de arrastar. sera que o problema nгo й em algum sistema meu.
Reply
#6

Quote:
Originally Posted by Matheus_Ecko
Посмотреть сообщение
mano eu tentei mais ta bug o sistema de arrastar. sera que o problema nгo й em algum sistema meu.
Deve ser, pois eu uso este Sistema num GM aqui e funciona perfeitamente =S O que acontece?
Reply
#7

tipo n arrasta o player para o carro, se vc quiser testar cmg o meu gm й sу adicionar no hamachi:

sala: BULRPG
senha: 123
ip: 5.164.53.209:7777
Reply
#8

Fiz um erro banal xD, ta ae :
pawn Код:
if (strcmp(cmd, "/arrastar", true) == 0)
    {
        new car;
        if(IsPlayerConnected(playerid))
        {
            if(IsACop(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "USE: /arrastar [id]");
                    return true;
                }
                if(!IsPlayerInAnyVehicle(playerid))
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo estб em um Veiculo !");
                    return true;
                }
                //giveplayerid = strval(tmp);
                giveplayerid = ReturnUser(tmp);
                if(IsPlayerInAnyVehicle(giveplayerid))
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "   O Jogador estб em um Veiculo !");
                    return 1;
                }
                if(PlayerCuffedTime[giveplayerid] <= 0)
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo pode arrastar e algemar pessoas que nгo estгo Imobilizadas!");
                    return 1;
                }
                if(giveplayerid == playerid)
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo pode se arrastar e algemar!");
                    return 1;
                }
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        car = GetPlayerVehicleID(playerid);
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        format(string, sizeof(string), "* Vocк foi arrastado e algemado pelo: %s.", sendername);
                        SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* Vocк arrastou e algemou %s.", giveplayer);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string), "* %s arrastou e algemou %s, para nao fugir.", sendername ,giveplayer);
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                        GameTextForPlayer(giveplayerid, "~r~Algemado", 2500, 3);
                        PutPlayerInVehicle(giveplayerid, car, 3);
                        TogglePlayerControllable(giveplayerid, 0);
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "   Este Jogador nгo estб ativo !");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo й Policial !");
            }
        }
        return true;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)