[Ajuda] Colocar carro apenas para a organizaзгo.
#1

Entгo pessoal, to querendo colocar estes carros aqui somente para a organizaзгo definida no cуdigo, e mesmo assim.. qualquer um pode entrar no carro. '--'

Alguem pode me ajudar?

Minha tentativa foi a seguinte:

PHP код:
new VComando[20]; 
PHP код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        for(new 
0sizeof(VComando); ++)
        {
            new 
vm GetPlayerVehicleID(playerid);
            if(
vm == VComando[i])
            {
                if(
PlayerInfo[playerid][pMembro] == 19 || PlayerInfo[playerid][pLider] == 19)
                {
                    
SendClientMessage(playerid,-1,"[ERRO] Vocк nгo й do Comando Vermelho.");
                    
RemovePlayerFromVehicle(playerid);
                }
            }
        }
    } 
PHP код:
//cv//
    
VComando[0] = AddStaticVehicleEx(522,2326.30004883,-1908.09997559,13.19999981,90.00000000,3,3,15); //NRG-500
    
VComando[1] = AddStaticVehicleEx(522,2326.69995117,-1918.40002441,13.19999981,90.00000000,3,3,15); //NRG-500
    
VComando[2] = AddStaticVehicleEx(522,2342.30004883,-1898.59997559,13.19999981,180.00000000,3,3,15); //NRG-500
    
VComando[3] = AddStaticVehicleEx(522,2344.80004883,-1898.90002441,13.19999981,180.00000000,3,3,15); //NRG-500
    
VComando[4] = AddStaticVehicleEx(522,2347.80004883,-1899.30004883,13.19999981,180.00000000,3,3,15); //NRG-500
    
VComando[5] = AddStaticVehicleEx(522,2350.50000000,-1899.30004883,13.19999981,180.00000000,3,3,15); //NRG-500
    
VComando[6] = AddStaticVehicleEx(562,2351.30004883,-1924.19995117,13.10000038,91.59899902,3,1,15); //Elegy
    
VComando[7] = AddStaticVehicleEx(562,2333.30004883,-1919.50000000,12.69999981,359.59289551,3,1,15); //Elegy
    
VComando[8] = AddStaticVehicleEx(562,2285.00000000,-1930.19995117,12.39999962,179.58795166,3,1,15); //Elegy
    
VComando[9] = AddStaticVehicleEx(562,2261.50000000,-1929.80004883,12.39999962,179.58251953,3,1,15); //Elegy
    
VComando[10] = AddStaticVehicleEx(565,2351.39990234,-1929.69995117,13.10000038,90.00000000,3,1,15); //Flash
    
VComando[11] = AddStaticVehicleEx(565,2238.30004883,-1930.50000000,12.39999962,181.00000000,3,1,15); //Flash
    
VComando[12] = AddStaticVehicleEx(565,2249.80004883,-1921.90002441,13.10000038,180.99969482,3,1,15); //Flash
    
VComando[13] = AddStaticVehicleEx(565,2249.80004883,-1929.80004883,13.10000038,180.99426270,3,1,15); //Flash
    
VComando[14] = AddStaticVehicleEx(567,2333.30004883,-1908.00000000,12.89999962,180.00000000,3,3,15); //Savanna
    
VComando[15] = AddStaticVehicleEx(567,2296.80004883,-1911.69995117,13.39999962,180.00000000,3,3,15); //Savanna
    
VComando[16] = AddStaticVehicleEx(567,2296.80004883,-1921.90002441,13.39999962,180.00000000,3,3,15); //Savanna
    
VComando[17] = AddStaticVehicleEx(567,2296.80004883,-1930.69995117,13.39999962,180.00000000,3,3,15); //Savanna
    
VComando[18] = AddStaticVehicleEx(487,2260.89990234,-1918.09997559,20.39999962,0.00000000,3,3,15); //Maverick
    
VComando[19] = AddStaticVehicleEx(487,2285.00000000,-1917.90002441,20.39999962,0.00000000,3,3,15); //Maverick 
Mas.. mesmo depois destas alternativas.. assim qualquer um ainda pode entrar no carro, sem proibiзгo alguma.. Ajudem. e.e
Reply
#2

pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        for(new i; i < sizeof(VComando); i++)
        {
            if(GetPlayerVehicleID(playerid) == VComando[i])
            {
                if(PlayerInfo[playerid][pLider] != 19 || PlayerInfo[playerid][pMembro] != 19)
                {
                    SendClientMessage(playerid, -1, "[ERRO] Vocк nгo й do Comando Vermelho.");
                    RemovePlayerFromVehicle(GetPlayerVehicleID(playerid));
                }
            }
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)