SA-MP Forums Archive
[Ajuda] Priva veiculos - 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] Priva veiculos (/showthread.php?tid=468915)



Priva veiculos - Liipiinhow - 11.10.2013

й assim meu gm й assim, a pessoa escreve /veh abre 1 um dialog pra pessoa escolhe o carro, eu queria o seguinte,tipo assim o vip da /veh ele tem os carro dele pra escolhe se ele nao pode.
Pode pergunta se eu esqueci de alguma coisa


Re: Priva veiculos - Menor - 11.10.2013

Crie seus prуprios cуdigos.


Re: Priva veiculos - ThuuGLif3 - 11.10.2013

Se fosse possнvel compartilhar o Cуdigo...



Re: Priva veiculos - Liipiinhow - 11.10.2013

pawn Код:
CMD:veh(playerid)
{
    if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, VERMELHO,"ERRO: Vocк nгo tem permissгo para usar este comando.");
    if(carro[playerid] == 0)
    {
    ShowPlayerDialog(playerid, DIALOG_VEH, DIALOG_STYLE_LIST, "Carros", "Sultan \nInfernus \nФnibus 1 \nBMX \nMountain Bike \nФnibus 2 \nFaggio \nSanchez \nQuad \nPacker \nCamper \nVortex \nNRG-500", "Criar", "Cancelar");
    }
    else
    SendClientMessage(playerid, VERMELHO,"ERRO: Vocк nгo pode criar mas que um veнculo, use (/dcm).");
    return 1;
}


pawn Код:
if(dialogid == DIALOG_VEH)
     {
      if(response)
       {
        if(listitem == 0)  // Sultan
        {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateVehicle(560, X+5, Y, Z+1, Angle, random(100), random(100), -1);
        carro[playerid] = 1;
        }
        if(listitem == 1)  // Infernus
        {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateVehicle(411, X+5, Y, Z+1, Angle, random(100), random(100), -1);
        carro[playerid] = 1;
        }
        if(listitem == 2)   // Фnibus 1
        {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateVehicle(437, X+5, Y, Z+1, Angle, random(100), random(100), -1);
        carro[playerid] = 1;
        }
        if(listitem == 3)   // BMX
        {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateVehicle(481, X+5, Y, Z+1, Angle, random(100), random(100), -1);
        carro[playerid] = 1;
        }
        if(listitem == 4)   // MOUNTAIN BIKE
        {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateVehicle(510, X+5, Y, Z+1, Angle, random(100), random(100), -1);
        carro[playerid] = 1;
        }
        if(listitem == 5)   // ФNIBUS 2
        {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateVehicle(431, X+5, Y, Z+1, Angle, random(100), random(100), -1);
        carro[playerid] = 1;
        }
        if(listitem == 6)   // FAGGIO
        {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateVehicle(462, X+5, Y, Z+1, Angle, random(100), random(100), -1);
        carro[playerid] = 1;
        }
        if(listitem == 7)   // SANCHEZ
        {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateVehicle(468, X+5, Y, Z+1, Angle, random(100), random(100), -1);
        carro[playerid] = 1;
        }
        if(listitem == 8)   // QUAD
        {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateVehicle(471, X+5, Y, Z+1, Angle, random(100), random(100), -1);
        carro[playerid] = 1;
        }
        if(listitem == 9)   // PACKER
        {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateVehicle(443, X+5, Y, Z+1, Angle, random(100), random(100), -1);
        carro[playerid] = 1;
        }
        if(listitem == 10)   // CAMPER
        {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateVehicle(483, X+5, Y, Z+1, Angle, random(100), random(100), -1);
        carro[playerid] = 1;
        }
        if(listitem == 11)   // VORTEX
        {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateVehicle(539, X+5, Y, Z+1, Angle, random(100), random(100), -1);
        carro[playerid] = 1;
        }
        if(listitem == 12)   // NRG-500
        {
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, Angle);
        CreateVehicle(522, X+5, Y, Z+1, Angle, random(100), random(100), -1);
        carro[playerid] = 1;
        }
      }
    }