SA-MP Forums Archive
[AJUDA]samp 0.3e - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA]samp 0.3e (/showthread.php?tid=342517)



[AJUDA]samp 0.3e - Rick_FusioN - 14.05.2012

Queria o Codigo das algemas & da sirene do samp 0.3e
Se alguem poder mim passar agradeзo Obrigado.

Procurei no Search, sobre isso mais nгo achei.



Re: [AJUDA]samp 0.3e - dPlaYer_ - 14.05.2012

https://sampforum.blast.hk/showthread.php?tid=342153


Re: [AJUDA]samp 0.3e - Rick_FusioN - 14.05.2012

Entгo cara, eu jб vi esse tentei mais nгo conseguir


Re: [AJUDA]samp 0.3e - Rick_FusioN - 14.05.2012

Se pode por no meu codigo e mandar pra mim?


Re: [AJUDA]samp 0.3e - After - 14.05.2012

Eu utilizo este no meu servidor.
pawn Код:
if(strcmp(cmd, "/algemar", true) == 0 || strcmp(cmd, "/algemar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pTanabolisante] > 0) return SendClientMessage(playerid,COLOR_GREY,"<!> Vocк estб suspenso!");
            if(IsACop(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                    SendClientMessage(playerid, COLOR_WHITE, "<!> /algemar [IdDOPlayer/ParteDoNome]");
                    return 1;
                }

                if(PlayerInfo[playerid][pDuty] == 0)
                {
                    SendClientMessage(playerid, COLOR_GREY, "* Vocк nгo estб em serviзo!");
                    return 1;
                }
                giveplayerid = ReturnUser(tmp);
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        if(IsACop(giveplayerid))
                        {
                            SendClientMessage(playerid, COLOR_GREY, "* Vocк nгo pode algemar um policial !");
                            return 1;
                        }
                        if(PlayerCuffed[giveplayerid] > 0)
                        {
                            SendClientMessage(playerid, COLOR_GREY, "* Jogador jб estб algemado !");
                            return 1;
                        }
                        if (ProxDetectorS(8.0, playerid, giveplayerid))
                        {
                            if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode se alegmar!");
                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                            format(string, sizeof(string), "* %s leva a mгo atй a cintura, em seguida retirando um par de algemar e algemando %s.", sendername ,giveplayer);
                            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            SetPlayerAttachedObject(giveplayerid, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
                            SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);

                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GREY, "* Este player nгo estб perto de vocк !");
                            return 1;
                        }
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "* Este player estб offline !");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "* vocк nгo й um COP !");
            }
        }
        return 1;
    }



Re: [AJUDA]samp 0.3e - Josma_cmd - 14.05.2012

Nгo conseguiu por um motivo simples, o cara fez um comando que usaria parвmetro usando cmdtext ao inves de cmd. Tente este:

pawn Код:
if(strcmp(cmd, "/algemar", true))
{
    new giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], string[128];
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "Uso Correto: /algemar [PlayerID]");
    giveplayerid = strval(tmp);
    if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0x1E90FF99, "Jogador Nгo conectado!");
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "O Jogador %s Algemou o Jogador %s!", sendername, giveplayer);
    SendClientMessageToAll(0x1E90FF99, string);    
    SetPlayerAttachedObject(giveplayerid, 4, 19418, 6, -0.031999, 0.024000, -0.024000, -7.900000, -32.000011, -72.299987, 1.115998, 1.322000, 1.406000);
    SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_CUFFED);
    return 1;
}
Ele tambйm nгo getou o nome do playerid, colocou um loop desnecessбrio entre outras coisas.


Re: [AJUDA]samp 0.3e - Rick_FusioN - 14.05.2012

Vou testar aqui..


Re: [AJUDA]samp 0.3e - Rick_FusioN - 14.05.2012

After Obrigado por postar.. mais nгo conseguir
Josma o seu eu conseguir Obrigado a todos..


Re: [AJUDA]samp 0.3e - Rick_FusioN - 14.05.2012

Aproveitando o Topico, existe algum modo de poder entrar 3 pessoas em um carro de 2 portas?


Re: [AJUDA]samp 0.3e - After - 14.05.2012

Quote:
Originally Posted by Rick_FusioN
Посмотреть сообщение
Aproveitando o Topico, existe algum modo de poder entrar 3 pessoas em um carro de 2 portas?
Que eu saiba, existem modificaзхes do prуprio GTA que aumentam esse limite, quando o usuбrio pressiona no caso G, ele automaticamente entra no veнculo, exemplo й a BMX. Existe uma modificaзгo de BMX que й possнvel entrar duas pessoas em uma ъnica BMX.
Exemplo: