[AJUDA] Comando /veh
#1

Olб,

Alguйm pode mim ajudar a como colocar o comando /veh, tipo ele й mais usado em servidores de torcidas, (vocк digita /veh e aperece um menu com mais ou menos uns dez carros), agora quem for mim ajudar, digite junto com o comando que sу adiministradores poзa usar, players normais nгo.

Obrigado!

Reply
#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
#3

Olha, eu coloquei tudo certinho, copilei e nao deu nenhum erro, mais quando entro no jogo e coloco o comando /veiculos nгo aparece nada.
Reply
#4

vc logou de RCON
Reply
#5

agooora funcionou, vlw!
Reply
#6

Tenso
Reply
#7

Quote:
Originally Posted by rafinha.faria
Посмотреть сообщение
+rep.. *-*
Tenso .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)