[Ajuda] /Desalgemar
#1

Galera me ajuddem '
tipo eu vo la e algemo alguem aew a mao de quem eu algemei fika pa traz
ai eu desalgemo ela ' ela conseg anda ' so qe a mao dela fika pra traz ainad ' alguem me ajuuuuuuda ' pf
pawn Код:
if (strcmp(cmd, "/desalgemar", true) == 0)
    {
        new aname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
        format(file, sizeof(file), PASTA_CONTAS, aname);
        if (dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 1)
        {
            new tmp[128];
            new plid;
            tmp = strtok(cmdtext, idx);
            if (!strlen(tmp))
            {
                SendClientMessage(playerid, Vermelho, "[x] Use: /desalgemar [id]");
                return 1;
            }
            plid = strval(tmp);
            if (IsPlayerInAnyVehicle(plid) == 1 || IsPlayerInAnyVehicle(playerid) == 1)
            {
                SendClientMessage(playerid, Vermelho, "[x] Alguem estб dentro de um carro.");
                return 1;
            }
            if (plid == playerid)
            {
                SendClientMessage(playerid, Vermelho, "[x] Vocк nгo pode tirar algemas de vocк mesmo.");
                return 1;
            }
            if (!IsPlayerConnected(plid))
            {
                SendClientMessage(playerid, Vermelho, "[x] O jogador nгo estб conectado");
                return 1;
            }
            else
            {
                if (GetDistanceBetweenPlayers(plid, playerid) < 10)
                {
                    ClearAnimations(plid);
                    RemovePlayerAttachedObject(plid,4);
                    format(string, sizeof(string), "(INFO) O Policial %s te desalgemou.", aname);
                    SendClientMessage(plid, Blue, string);
                    TogglePlayerControllable(plid, 1);// mas oq eu mudei n tem nada a ver... per a aientra la pra ve agr' vc mudo uma coisa esqueceu ^^
                    SendClientMessage(playerid, COLOR_GREEN, "(INFO) Desalgemado com sucesso.");
                    algemado[plid] = 0;
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, Vermelho, "(INFO) Chegue mais perto para desalgemar.");
                    return 1;
                }
            }
        }
        else
        {
            SendClientMessage(playerid, Vermelho, "(INFO) Apenas policiais podem usar este comando.");
            return 1;
        }
    }
Reply
#2

Ele pediu pra postar o cod pra ele
pawn Код:
if (strcmp(cmd, "/algemar", true) == 0)
    {
        new aname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
        format(file, sizeof(file), PASTA_CONTAS, aname);
        if (dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 1)
        {
            new tmp[128];
            new plid;
            tmp = strtok(cmdtext, idx);
            if (!strlen(tmp))
            {
                SendClientMessage(playerid, Vermelho, "[x] Use: /algemar [id]");
                return 1;
            }
            plid = strval(tmp);
            if (IsPlayerInAnyVehicle(plid) == 1 || IsPlayerInAnyVehicle(playerid) == 1)
            {
                SendClientMessage(playerid, Vermelho, "[x] Alguem estб dentro de um carro.");
                return 1;
            }
            if (plid == playerid)
            {
                SendClientMessage(playerid, Vermelho, "[x] Vocк nгo pode algemar vocк mesmo.");
                return 1;
            }
            if (!IsPlayerConnected(plid))
            {
                SendClientMessage(playerid, Vermelho, "[x] O jogador nгo estб conectado");
                return 1;
            }
            else
            {
                if (GetDistanceBetweenPlayers(plid, playerid) < 10)
                {
                    SetPlayerAttachedObject(plid, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
                    SetPlayerSpecialAction(plid, 24);
                    format(string, sizeof(string), "(INFO) O Policial %s te algemou.", aname);
                    SendClientMessage(plid, Blue, string);
                    TogglePlayerControllable(plid, 0);
                    SendClientMessage(playerid, COLOR_GREEN, "(INFO) Algemado com sucesso.");
                    algemado[plid] = 1;
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, Vermelho, "[x] Chegue mais perto para algemar.");
                    return 1;
                }
            }
        }
        else
        {
            SendClientMessage(playerid, Vermelho, "[x] Apenas policiais podem usar este comando.");
            return 1;
        }
    }
    if (strcmp(cmd, "/desalgemar", true) == 0)
    {
        new aname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
        format(file, sizeof(file), PASTA_CONTAS, aname);
        if (dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 1)
        {
            new tmp[128];
            new plid;
            tmp = strtok(cmdtext, idx);
            if (!strlen(tmp))
            {
                SendClientMessage(playerid, Vermelho, "[x] Use: /desalgemar [id]");
                return 1;
            }
            plid = strval(tmp);
            if (IsPlayerInAnyVehicle(plid) == 1 || IsPlayerInAnyVehicle(playerid) == 1)
            {
                SendClientMessage(playerid, Vermelho, "[x] Alguem estб dentro de um carro.");
                return 1;
            }
            if (plid == playerid)
            {
                SendClientMessage(playerid, Vermelho, "[x] Vocк nгo pode tirar algemas de vocк mesmo.");
                return 1;
            }
            if (!IsPlayerConnected(plid))
            {
                SendClientMessage(playerid, Vermelho, "[x] O jogador nгo estб conectado");
                return 1;
            }
            else
            {
                if (GetDistanceBetweenPlayers(plid, playerid) < 10)
                {
                    ClearAnimations(plid);
                    RemovePlayerAttachedObject(plid,4);
                    format(string, sizeof(string), "(INFO) O Policial %s te desalgemou.", aname);
                    SendClientMessage(plid, Blue, string);
                    TogglePlayerControllable(plid, 1);// mas oq eu mudei n tem nada a ver... per a aientra la pra ve agr' vc mudo uma coisa esqueceu ^^
                    SendClientMessage(playerid, COLOR_GREEN, "(INFO) Desalgemado com sucesso.");
                    algemado[plid] = 0;
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, Vermelho, "(INFO) Chegue mais perto para desalgemar.");
                    return 1;
                }
            }
        }
        else
        {
            SendClientMessage(playerid, Vermelho, "(INFO) Apenas policiais podem usar este comando.");
            return 1;
        }
    }
@Codigo
Esse codigo й meio estranho kkk ve se o cara й Cop direto da pasta... mas entгo ta nй
Reply
#3

Nгo sou muito familiarizado com esse tipo de comando, mas vamos la
Vocк pode tentar duas coisas, ao meu ver.
Na primeira vocк pode trocar

Код:
ClearAnimations(plid);
por

Код:
ClearAnimations(plid,24);
Se nгo der certo, e SOMENTE se nгo der certo, tente acrescentar o comando abaixo

Код:
RemovePlayerSpecialAction(plid,24);
Em baixo de

Код:
RemovePlayerAttachedObject(plid,4)
Reply
#4

vou tentar ' e se der certo do um edit aki'
Reply
#5

Da uma lida porque eu mesmo dei um edit no meu post. Eu tinha errado em alguns comandos.
Reply
#6

dexter' o primeiro ' nao deu em nd ' e o segundo deu 1 error' undefined symbol' ''RemovePlayerSpeialAction''
Reply
#7

Faltou um c ai.. EspecialAction
Reply
#8

lukas' eu escrevi errado aki' mais la eu tinha escrevido certo :d'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)