[Ajuda] Destruir carros
#7

Quote:
Originally Posted by MultiKill
Посмотреть сообщение
Vocк terб que usar uma loop, e variбveis.
pawn Код:
new PlayerCv[500];
new CarPlayerID[500];
pawn Код:
if(strcmp(cmd, "/cv", true) == 0)
{
PlayerCv[playerid] = 1;
CarPlayerID[playerid] = CreateVehicle(522, 0.0, 0.0, 0.0, 0.0, -1, -1, 120000);
return 1;
}
if(strcmp(cmd, "/destruircarro", true) == 0)
{
    for(new i=0; i<500; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerCv[i] == 1)
            {
                if(GetPlayerVehicleID(playerid) == CarPlayerID[i])
                {
                    DestroyVehicle(GetPlayerVehicleID(playerid));
                    PlayerCv[i] = 0;
                    CarPlayerID[i] = 0;
                }
                else
                {
                    SendClientMessage(playerid, -1, "Vocк nгo estб em um veнculo criado pelo comando /cv");
                }
            }
        }
    }
}
Use a funзгo IsPlayerInAnyVehicle para ver se o player estб em algum veнculo no comando /destruirveiculo
Quote:

C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(804) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(807) : error 055: start of function body without function header
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(820) : error 055: start of function body without function header
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(833) : error 055: start of function body without function header
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(846) : error 055: start of function body without function header
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(859) : error 055: start of function body without function header
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(871) : error 055: start of function body without function header
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(884) : error 055: start of function body without function header
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(897) : error 055: start of function body without function header
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(911) : error 055: start of function body without function header
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(924) : error 010: invalid function or declaration
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(3102) : warning 217: loose indentation
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(3115) : warning 217: loose indentation
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(3931) : warning 217: loose indentation
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(3931) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(3932) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(3934) : warning 217: loose indentation
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(5899) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(5899) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(5899) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(5899) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(5899) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(5899) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(5899) : warning 202: number of arguments does not match definition
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(13801) : warning 217: loose indentation
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(13825) : warning 217: loose indentation
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(1383 : warning 217: loose indentation
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(14640) : warning 217: loose indentation
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(14642) : error 017: undefined symbol "PlayerCv"
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(14642) : warning 215: expression has no effect
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(14642) : error 001: expected token: ";", but found "]"
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(14642) : error 029: invalid expression, assumed zero
C:\Users\Administrator\Downloads\PARTE 1\GM\GM\gamemodes\BVR.pwn(14642) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


15 Errors.

Eu quero um comando que destrua todos os carros e nгo apenas o que eu criei!
Reply


Messages In This Thread
Destruir carros - by logan1910 - 23.06.2014, 17:56
Re: [AJUDA]Destruir carros - by MultiKill - 23.06.2014, 19:04
Re: [AJUDA]Destruir carros - by logan1910 - 23.06.2014, 19:16
Re: [AJUDA]Destruir carros - by TioSlash - 23.06.2014, 19:19
Re: [AJUDA]Destruir carros - by logan1910 - 23.06.2014, 19:22
Re: [AJUDA]Destruir carros - by MultiKill - 23.06.2014, 19:32
Re: [AJUDA]Destruir carros - by logan1910 - 23.06.2014, 19:36
Re: [AJUDA]Destruir carros - by MultiKill - 23.06.2014, 19:38
Re: [AJUDA]Destruir carros - by logan1910 - 24.06.2014, 02:38
Re: [AJUDA]Destruir carros - by MultiKill - 24.06.2014, 02:50

Forum Jump:


Users browsing this thread: 1 Guest(s)