[Ajuda] Erro Comando de Criar Carros
#1

bom, achei um comando de criar carros por nome ou id via internet, posteriormente vou melhorar o comando para colocar em caixinha e separar em categoria, mas agr preciso do comando , como nao sei procurei na net e foi oq achei

pawn Код:
CMD:v(playerid, params[])
{
        new Vehicle[32], VehicleID, ColorOne, ColorTwo;
        PlayerInfo[playerid][pCanSpawnVehicle] = true;
        if(sscanf(params, "s[32]D(1)D(1)", Vehicle, ColorOne, ColorTwo))
        {
            PlayerInfo[playerid][pCanSpawnVehicle] = true;
            SendClientMessage(playerid, COLOR_GREY, "[USAGE]: /v[Vehiclename/Vehicleid] [Color 1 (optional)] [Color 2 (optional)]");
            SendClientMessage(playerid, COLOR_GREY, "[USAGE]: Like /v Turismo , /v Elegy /v Nrg /v 522");
            return 1;
        }

        if(PlayerInfo[playerid][pCanSpawnVehicle])
        {
            VehicleID = GetVehicleModelIDFromName(Vehicle);
            if(VehicleID != 425 && VehicleID != 432 && VehicleID != 447 &&
               VehicleID != 430 && VehicleID != 417 && VehicleID != 435 &&
           VehicleID != 446 && VehicleID != 449 && VehicleID != 450 &&
               VehicleID != 452 && VehicleID != 453 && VehicleID != 454 &&
                   VehicleID != 460 && VehicleID != 464 && VehicleID != 465 &&
                   VehicleID != 469 && VehicleID != 472 && VehicleID != 473 &&
                   VehicleID != 476 && VehicleID != 484 && VehicleID != 487 &&
                   VehicleID != 488 && VehicleID != 493 && VehicleID != 497 &&
                   VehicleID != 501 && VehicleID != 511 && VehicleID != 512 &&
                   VehicleID != 513 && VehicleID != 519 && VehicleID != 520 &&
                   VehicleID != 537 && VehicleID != 538 && VehicleID != 548 &&
                   VehicleID != 553 && VehicleID != 563 && VehicleID != 564 &&
                   VehicleID != 569 && VehicleID != 570 && VehicleID != 577 &&
                   VehicleID != 584 && VehicleID != 590 && VehicleID != 591 &&
                   VehicleID != 592 && VehicleID != 593 && VehicleID != 594 &&
                   VehicleID != 595 && VehicleID != 606 && VehicleID != 607 &&
                   VehicleID != 608 && VehicleID != 610 && VehicleID != 611) {
                        if(VehicleID == -1 )
                        {
                                VehicleID = strval(Vehicle);

                                if(VehicleID < 400 || VehicleID > 611 )
                                {
                                        return SendClientMessage(playerid, COLOR_GREY, "You entered an invalid vehiclename!");
                                }
                        }

                        GetPlayerPos(playerid, pX, pY, pZ);
                        GetPlayerFacingAngle(playerid, pAngle);

                        DestroyVehicle(PlayerInfo[playerid][pSpawnVehicle]);
                        PlayerInfo[playerid][pSpawnVehicle] = CreateVehicle(VehicleID, pX, pY, pZ+2.0, pAngle, ColorOne, ColorTwo, -1);
                        LinkVehicleToInterior(PlayerInfo[playerid][pSpawnVehicle], GetPlayerInterior(playerid));
                        PutPlayerInVehicle(playerid, PlayerInfo[playerid][pSpawnVehicle], 0);
                        SendClientMessage(playerid, COLOR_GREY, "You succesfully spawned this vehicle!");
                } else {
                    SendClientMessage(playerid, COLOR_GREY, "You are not allowed to spawn this vehicle!!");
                }
        } else {
                SendClientMessage(playerid, COLOR_GREY, "You can not spawn vehicles in this zone!");
        }
        return 1;
}
pawn Код:
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : warning 217: loose indentation
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : error 029: invalid expression, assumed zero
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : error 017: undefined symbol "cmd_v"
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : error 029: invalid expression, assumed zero
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
esses sao os erros, mas para a nao confusao de quem for me ajudar, eu coloquei esse comando em OnPlayerCommandText ja que nao sabia onde isso pode ir ,( acho q deve ser ai mesmo mas sei la o troзo nao usa /command .-. )

PS: linha 156 e esta
pawn Код:
CMD:v(playerid, params[])
Reply


Messages In This Thread
Erro Comando de Criar Carros - by williamgato - 11.04.2014, 02:08
Re: [AJUDA]Erro Comando de Criar Carros - by Stroon - 11.04.2014, 02:46
Re: [AJUDA]Erro Comando de Criar Carros - by williamgato - 11.04.2014, 02:51
Re: [AJUDA]Erro Comando de Criar Carros - by Krisky_ - 11.04.2014, 02:56
Re: [AJUDA]Erro Comando de Criar Carros - by Stroon - 11.04.2014, 03:09
Re: [AJUDA]Erro Comando de Criar Carros - by williamgato - 11.04.2014, 03:51
Re: [AJUDA]Erro Comando de Criar Carros - by Stroon - 11.04.2014, 12:01
Re: [AJUDA]Erro Comando de Criar Carros - by DannielCooper - 11.04.2014, 13:50
Re: [AJUDA]Erro Comando de Criar Carros - by Stroon - 11.04.2014, 14:21
Re: [AJUDA]Erro Comando de Criar Carros - by williamgato - 12.04.2014, 00:39

Forum Jump:


Users browsing this thread: 3 Guest(s)