[AJUDA] Comando /veh
#2

pawn Код:
// coloca no OnPlayerCommandText

if(strcmp("/veiculos",cmdtext,true)==0)
{
        if(!IsPlayerAdmin(playerid)) return 1;
        if(IsPlayerInAnyVehicle(playerid) == 0)
        {
           
            ShowPlayerDialog(playerid, 4546, DIALOG_STYLE_LIST, "{FFFF00}Veiculos", "{F60000}Infernus\n{F60000}Turismo\n{F60000}Sandking\n{F60000}Super GT\n{F60000}Alpha\n{F60000}Euros\n{F60000}Elegy\n{F60000}NRG-500\n{F60000}Maverick\n{F60000}Monster\n{F60000}Sultan\n{F60000}Jetmax\n{F60000}BMX\n{F60000}Moutain Bike", "Pegar", "Cancelar");
            return 1;
        }else SendClientMessage(playerid, 0xFF0606FF, " Vocк jб estб em um veiculo");
        return 1;
        }
}

// Coloca no OnDialogResponse

if(dialogid == 4546)
      {
           if(response)
           {
                new Float:CorX,Float:CorY,Float:CorZ,vvid[MAX_PLAYERS];
                if(listitem == 0) // Infernus
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(411,CorX +1,CorY +1,CorZ,r,-1,-1,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);


                }
                else if(listitem == 1) // Turismo
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(451,CorX +1,CorY +1,CorZ,r,1,1,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);

                }
                else if(listitem == 2) // Carro Rally
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(495,CorX +1,CorY +1,CorZ,r,-1,-1,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);

                }
                else if(listitem == 3) // Super GT
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(506,CorX +1,CorY +1,CorZ,r,1,6,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);

                }
                else if(listitem == 4)// Alpha
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(602,CorX +1,CorY +1,CorZ,r,1,6,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);

                }
                else if(listitem == 5) // Euros
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(587,CorX +1,CorY +1,CorZ,r,1,6,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);

                }
                else if(listitem == 6) // Elegy
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(562,CorX +1,CorY +1,CorZ,r,1,6,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);

                }
                else if(listitem == 7) // NRG
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(522,CorX +1,CorY +1,CorZ,r,1,6,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);

                }
                else if(listitem == 8) // Maverik
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(487,CorX +1,CorY +1,CorZ,r,1,6,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);

                }
                else if(listitem == 9) // Monster
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(556,CorX +1,CorY +1,CorZ,r,1,6,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);

                }
                else if(listitem == 10) // Sultan
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(560,CorX +1,CorY +1,CorZ,r,1,6,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);

                }
                else if(listitem == 11) // Jetmax
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(493,CorX +1,CorY +1,CorZ,r,1,6,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);

                }
                else if(listitem == 12) // BMX
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(481,CorX +1,CorY +1,CorZ,r,1,6,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);

                }
                else if(listitem == 13) // Moutain Bike
                {
                new Float:r;
                GetPlayerFacingAngle(playerid,r);
                GetPlayerPos(playerid,CorX,CorY,CorZ);
                vvid[playerid] = CreateVehicle(510,CorX +1,CorY +1,CorZ,r,1,6,30);SetVehicleVirtualWorld(vvid[playerid],GetPlayerVirtualWorld(playerid));
                PutPlayerInVehicle(playerid, vvid[playerid], 0);

                }
           }
           return 1;
      }
Se der algum erro poste aki... ^^
Reply


Messages In This Thread
[AJUDA] Comando /veh - by Gabriel Santana - 09.04.2012, 18:13
Re: [AJUDA] Comando /veh - by rafinha.faria - 09.04.2012, 18:42
Respuesta: [AJUDA] Comando /veh - by Gabriel Santana - 09.04.2012, 19:03
Re: [AJUDA] Comando /veh - by rafinha.faria - 09.04.2012, 19:14
Respuesta: [AJUDA] Comando /veh - by Gabriel Santana - 09.04.2012, 19:18
Re: [AJUDA] Comando /veh - by rafinha.faria - 09.04.2012, 19:19
Re: [AJUDA] Comando /veh - by BreakDriFT - 09.04.2012, 19:22

Forum Jump:


Users browsing this thread: 1 Guest(s)