[Ajuda] Veiculos das Orgs [Todos entram]
#1

Olб pessoal do FSAMP, eu estou com um poblema que ja fiz tanta coisa pra tentar resolver e nada!!!
Os carros de algumas orgs de meu gm estгo com o poblema de que qualquer 1 mesmo nгo sendo da org pode entrar..

aqui vai o da org 22 = Alqaeda

News do Comeзo do GM
pawn Код:
new Alqaedacars[10];
public OnGameModeInit()
pawn Код:
//ALQAEDA
    Alqaedacars[0] = CreateVehicle(520,324.9713,2540.2708,17.5394,178.4089,13,15,900000000);
    Alqaedacars[1] = CreateVehicle(520,291.0008,2537.9241,17.5511,181.5882,13,15,900000000);
    Alqaedacars[2] = CreateVehicle(432,340.9103,2540.8843,16.7968,178.7747,13,15,900000000);
    Alqaedacars[3] = CreateVehicle(432,347.8843,2540.6343,16.7605,178.7184,13,15,900000000);
    Alqaedacars[4] = CreateVehicle(447,365.1062,2534.7402,16.6932,179.8974,0,0,900000000);
    Alqaedacars[5] = CreateVehicle(521,401.8698,2537.3992,16.1111,138.8839,0,0,900000000);
    Alqaedacars[6] = CreateVehicle(521,405.7745,2537.2878,16.1167,144.6921,0,0,900000000);
    Alqaedacars[7] = CreateVehicle(458,392.5025,2534.7722,16.4214,178.9787,0,0,900000000);
    Alqaedacars[8] = CreateVehicle(458,386.5785,2534.9148,16.4177,177.8372,0,0,900000000);
    Alqaedacars[9] = CreateVehicle(458,380.9190,2535.1545,16.4308,176.7726,0,0,900000000);
public OnPlayerStateChange(playerid, newstate, oldstate)
pawn Код:
if(vid==Alqaedacars[0]||vid==Alqaedacars[1]||vid==Alqaedacars[2]||vid==Alqaedacars[3]||vid==Alqaedacars[4]||vid==Alqaedacars[5]||vid==Alqaedacars[6]||vid==Alqaedacars[7]||vid==Alqaedacars[8]||vid==Alqaedacars[9])
        {
            if(PlayerInfo[playerid][pMember] == 22||PlayerInfo[playerid][pLeader] == 22) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й da Alqaeda.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
Reply
#2

pawn Код:
for(new i = 0; i < sizeof(Alqaedacars); i ++)
{
    if(vid==Alqaedacars[i])
    {
        if(PlayerInfo[playerid][pLeader] != 22 && PlayerInfo[playerid][pMember] != 22)
        {
            SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й da Alqaeda.");
            RemovePlayerFromVehicle(playerid);
            TogglePlayerControllable(playerid, 1);
        }
    }
}
Reply
#3

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
pawn Код:
for(new i = 0; i < sizeof(Alqaedacars); i ++)
{
    if(vid==Alqaedacars[i])
    {
        if(PlayerInfo[playerid][pLeader] != 22 && PlayerInfo[playerid][pMember] != 22)
        {
            SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й da Alqaeda.");
            RemovePlayerFromVehicle(playerid);
            TogglePlayerControllable(playerid, 1);
        }
    }
}
Mesma coisa vini, ainda da pra todos entrar!!!
Reply
#4

Posta vid aн...
Reply
#5

ISSO;
pawn Код:
new vid = GetPlayerVehicleID(playerid);
ou

pawn Код:
new vid = GetPlayerVehicleID(playerid);
        for(new i = 0; i < sizeof(Alqaedacars); i ++)
        {
            if(vid==Alqaedacars[i])
            {
                if(PlayerInfo[playerid][pLeader] != 22 && PlayerInfo[playerid][pMember] != 22)
                {
                    SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й da Alqaeda.");
                    RemovePlayerFromVehicle(playerid);
                    TogglePlayerControllable(playerid, 1);
                }
            }
        }
        if(vid==GroveCars[0]||vid==GroveCars[1]||vid==GroveCars[2]||vid==GroveCars[3]||vid==GroveCars[4]||vid==GroveCars[5])
        {
            if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6) { }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й da Grove Street Families.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==RiffaCars[0]||vid==RiffaCars[1]||vid==RiffaCars[2]||vid==RiffaCars[3]||vid==RiffaCars[4]||vid==RiffaCars[5])
        {
            if(PlayerInfo[playerid][pMember] == 11||PlayerInfo[playerid][pLeader] == 11) { }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й da San Fierro Riffa.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==FaCars[0]||vid==FaCars[1]||vid==FaCars[2]||vid==FaCars[3]||vid==FaCars[4]||vid==FaCars[5]||vid==FaCars[6]||vid==FaCars[7]||vid==FaCars[8]||vid==FaCars[9]||vid==FaCars[10]||vid==FaCars[11]||vid==FaCars[12]||vid==FaCars[13]||vid==FaCars[14])
        {
            if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3) { }
            else if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pMember] == 21)
            {
            RemovePlayerFromVehicle(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Federal.");
                WantedPoints[playerid] += 1;
                SetPlayerWantedLevel(playerid, WantedPoints[playerid]);
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==Reboque[0]||vid==Reboque[1])
        {
            if(PlayerInfo[playerid][pJob] == 7) { }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Mecвnico.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==HeliPM[0])
        {
            if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
            {
            if(PlayerInfo[playerid][pRank] < 5)
            {
            SendClientMessage(playerid, COLOR_RED, "{FF3D3D}[Erro]{FFFFFF} Vocк ainda nгo pode utilizar o Helicoptero da L.S.P.D.");
            RemovePlayerFromVehicle(playerid);
            }
            }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um oficial da L.S.P.D.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==HeliBope[0])
        {
            if(PlayerInfo[playerid][pMember] == 21||PlayerInfo[playerid][pLeader] == 21)
            {
            if(PlayerInfo[playerid][pRank] < 5)
            {
            SendClientMessage(playerid, COLOR_RED, "{FF3D3D}[Erro]{FFFFFF} Vocк ainda nгo pode utilizar o Helicoptero da Bope.");
            RemovePlayerFromVehicle(playerid);
            }
            }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um oficial da Bope.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==HeliPR[0])
        {
            if(PlayerInfo[playerid][pMember] == 14||PlayerInfo[playerid][pLeader] == 14)
            {
            if(PlayerInfo[playerid][pRank] < 5)
            {
            SendClientMessage(playerid, COLOR_RED, "{FF3D3D}[Erro]{FFFFFF} Vocк ainda nгo pode utilizar o Helicoptero da PR.");
            RemovePlayerFromVehicle(playerid);
            }
            }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й do Detran.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==HeliFBI[0])
        {
            if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2)
            {
            if(PlayerInfo[playerid][pRank] < 5)
            {
            SendClientMessage(playerid, COLOR_RED, "{FF3D3D}[Erro]{FFFFFF} Vocк ainda nгo tem autorizaзгo para utilizar o helicoptero do F.B.I.");
            RemovePlayerFromVehicle(playerid);
            }
            }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й do F.B.I.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==FBICar[0]||vid==FBICar[1]||vid==FBICar[2]||vid==FBICar[3]||vid==FBICar[4]||vid==FBICar[5]||vid==FBICar[6]||vid==FBICar[7])
        {
            if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2) { }
            else if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pMember] == 14||PlayerInfo[playerid][pMember] == 21)
            {
            RemovePlayerFromVehicle(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Federal.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==PMcars[0]||vid==PMcars[1]||vid==PMcars[2]||vid==PMcars[3]||vid==PMcars[4]||vid==PMcars[5]||vid==PMcars[6]||vid==PMcars[7]||vid==PMcars[8]||vid==PMcars[9])
        {
            if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1) { }
            else if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pMember] == 14||PlayerInfo[playerid][pMember] == 21)
            {
            RemovePlayerFromVehicle(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Federal.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==PRcars[0]||vid==PRcars[1]||vid==PRcars[2]||vid==PRcars[3]||vid==PRcars[4]||vid==PRcars[5]||vid==PRcars[6]||vid==PRcars[7]||vid==PRcars[8]||vid==PRcars[9]||vid==PRcars[10]||vid==PRcars[11])
        {
            if(PlayerInfo[playerid][pMember] == 14||PlayerInfo[playerid][pLeader] == 14) { }
            else if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pMember] == 21)
            {
                RemovePlayerFromVehicle(playerid);
            }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й do Detran.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==PRcars[7])
        {
            if(IsACop(playerid))
            { SetPlayerArmour(playerid, 60); }
            else { SetPlayerArmour(playerid, 0); }
            return 1;
        }
        if(vid==BopeCar[0]||vid==BopeCar[1]||vid==BopeCar[2]||vid==BopeCar[3]||vid==BopeCar[4]||vid==BopeCar[5]||vid==BopeCar[6]||vid==BopeCar[7]||vid==BopeCar[8])
        {
            if(PlayerInfo[playerid][pMember] == 21||PlayerInfo[playerid][pLeader] == 21) { }
            else if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pMember] == 14)
            {
                RemovePlayerFromVehicle(playerid);
            }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й do Bope.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==BopeCar[6])
        {
            if(IsACop(playerid))
            { SetPlayerArmour(playerid, 60); }
            else { SetPlayerArmour(playerid, 0); }
            return 1;
        }
        if(vid==BopeCar[7])
        {
            if(IsACop(playerid))
            { SetPlayerArmour(playerid, 60); }
            else { SetPlayerArmour(playerid, 0); }
            return 1;
        }
        if(vid==Pcccars[0]||vid==Pcccars[1]||vid==Pcccars[2]||vid==Pcccars[3]||vid==Pcccars[4])
        {
            if(PlayerInfo[playerid][pMember] == 20||PlayerInfo[playerid][pLeader] == 20) { }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й do PCC.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==BallasCars[0]||vid==BallasCars[1]||vid==BallasCars[2]||vid==BallasCars[3]||vid==BallasCars[4]||vid==BallasCars[5])
        {
            if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5) { }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й dos Front Yard Ballas.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==HitmanCar[0]||vid==HitmanCar[1]||vid==HitmanCar[2]||vid==HitmanCar[3]||vid==HitmanCar[4]||vid==HitmanCar[5]||vid==HitmanCar[6])
        {
            if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
            {
                if(PlayerInfo[playerid][pRank] < 3 && vid == HitmanCar[0])
                {
                    SendClientMessage(playerid, COLOR_RED, "Seu cargo nгo permite que vocк use este veнculo.");
                    RemovePlayerFromVehicle(playerid);
                    TogglePlayerControllable(playerid, 1);
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Assassino.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==VagosCars[0]||vid==VagosCars[1]||vid==VagosCars[2]||vid==VagosCars[3]||vid==VagosCars[4]||vid==VagosCars[5])
        {
            if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Los Santos Vagos.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==Cmver[0]||vid==Cmver[1]||vid==Cmver[2]||vid==Cmver[3]||vid==Cmver[4]||vid==Cmver[5]||vid==Cmver[6])
        {
            if(PlayerInfo[playerid][pMember] == 19 || PlayerInfo[playerid][pLeader] == 19) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um do Comando Vermelho.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==Drifters[0]||vid==Drifters[1]||vid==Drifters[2]||vid==Drifters[3]||vid==Drifters[4])
        {
            if(PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Drifter.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==Lowriders[0]||vid==Lowriders[1]||vid==Lowriders[2]||vid==Lowriders[3]||vid==Lowriders[4])
        {
            if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Lowrider.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==TexasCar[0]||vid==TexasCar[1]||vid==TexasCar[2]||vid==TexasCar[3]||vid==TexasCar[4]||vid==TexasCar[5]||vid==TexasCar[6])
        {
            if(PlayerInfo[playerid][pMember] == 27 || PlayerInfo[playerid][pLeader] == 27) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo do Texas Syndicate.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==TriadsCar[0]||vid==TriadsCar[1]||vid==TriadsCar[2]||vid==TriadsCar[3]||vid==TriadsCar[4]||vid==TriadsCar[5]||vid==TriadsCar[6])
        {
            if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Triads.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==prefeitocars[0]||vid==prefeitocars[1]||vid==prefeitocars[2]||vid==prefeitocars[3]||vid==prefeitocars[4])
        {
            if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й Membro Polнtico.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==LixoCar[0]||vid==LixoCar[1])
        {
            if(PlayerInfo[playerid][pJob] == 22) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Lixeiro.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==YakuzaCars[0]||vid==YakuzaCars[1]||vid==YakuzaCars[2]||vid==YakuzaCars[3]||vid==YakuzaCars[4]||vid==YakuzaCars[5]||vid==YakuzaCars[6])
        {
            if(PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й da Mafia Yakuza.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==AztecasCars[0]||vid==AztecasCars[1]||vid==AztecasCars[2]||vid==AztecasCars[3]||vid==AztecasCars[4]||vid==AztecasCars[5]||vid==AztecasCars[6])
        {
            if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Azteca.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==Motocas[0]||vid==Motocas[1]||vid==Motocas[2]||vid==Motocas[3]||vid==Motocas[4]||vid==Motocas[5])
        {
            if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Alphalt King.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==CarrosdosAmigos[0]||vid==CarrosdosAmigos[1]||vid==CarrosdosAmigos[2]||vid==CarrosdosAmigos[3]||vid==CarrosdosAmigos[4])
        {
            if(PlayerInfo[playerid][pMember] == 23 || PlayerInfo[playerid][pLeader] == 23) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Amigo dos Amigos.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==CarrosdosAryan[0]||vid==CarrosdosAryan[1]||vid==CarrosdosAryan[2]||vid==CarrosdosAryan[3]||vid==CarrosdosAryan[4])
        {
            if(PlayerInfo[playerid][pMember] == 24 || PlayerInfo[playerid][pLeader] == 24) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й um Aryan Brotherhood.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==CarrosdosBloodz[0]||vid==CarrosdosBloodz[1]||vid==CarrosdosBloodz[2]||vid==CarrosdosBloodz[3]||vid==CarrosdosBloodz[4])
        {
            if(PlayerInfo[playerid][pMember] == 25 || PlayerInfo[playerid][pLeader] == 25) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й dos Bloodz.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==Cripscar[0]||vid==Cripscar[1]||vid==Cripscar[2]||vid==Cripscar[3]||vid==Cripscar[4]||vid==Cripscar[5])
        {
            if(PlayerInfo[playerid][pMember] == 26 || PlayerInfo[playerid][pLeader] == 26) {  }
            else
            {
                SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й dos Crips.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vId==vipcar[0])
        {
            new nome[24];
            GetPlayerName(playerid, nome, sizeof nome);
            if(strfind(nome, "Felipe_Freeze", true) == 0)
                        {
               SendClientMessage(playerid,COLOR_LIGHTBLUE,"{ffffff}Bem vindo a sua {9f9f9f}Moto {01b333}Felipe_Freeze{ffffff}.");
               return 1;
            }
            else
            {
               SendClientMessage(playerid,COLOR_RED,"{ffffff}Veнculo:{9f9f9f}Moto{ffffff}Dono:{0082fb}Felipe_Freeze{ffffff}.");
               RemovePlayerFromVehicle(playerid);
               TogglePlayerControllable(playerid, 1);
               return 1;
            }
        }
        if(vId==vipcar[1])
        {
            new nome[24];
            GetPlayerName(playerid, nome, sizeof nome);
            if(strfind(nome, "Meentos_Freeze", true) == 0)
                        {
               SendClientMessage(playerid,COLOR_LIGHTBLUE,"{ffffff}Bem vindo a sua {9f9f9f}Moto {01b333}Meentos_Freeze{ffffff}.");
               return 1;
            }
            else
            {
               SendClientMessage(playerid,COLOR_RED,"{ffffff}Veнculo:{9f9f9f}Moto{ffffff}Dono:{0082fb}Meentos_Freeze{ffffff}.");
               RemovePlayerFromVehicle(playerid);
               TogglePlayerControllable(playerid, 1);
               return 1;
            }
        }
        if(vId==vipcar[2])
        {
            new nome[24];
            GetPlayerName(playerid, nome, sizeof nome);
            if(strfind(nome, "LoorD_Freeze", true) == 0)
                        {
               SendClientMessage(playerid,COLOR_LIGHTBLUE,"{ffffff}Bem vindo a sua {9f9f9f}Moto {01b333}LoorD_Freeze{ffffff}.");
               return 1;
            }
            else
            {
               SendClientMessage(playerid,COLOR_RED,"{ffffff}Veнculo:{9f9f9f}Moto{ffffff}Dono:{0082fb}LoorD_Freeze{ffffff}.");
               RemovePlayerFromVehicle(playerid);
               TogglePlayerControllable(playerid, 1);
               return 1;
            }
        }
        if(vId==vipcar[3])
        {
            new nome[24];
            GetPlayerName(playerid, nome, sizeof nome);
            if(strfind(nome, "Felipe_Freeze", true) == 0)
                        {
               SendClientMessage(playerid,COLOR_LIGHTBLUE,"{ffffff}Bem vindo ao seu {9f9f9f}Bullet {01b333}Felipe_Freeze{ffffff}.");
               return 1;
            }
            else
            {
               SendClientMessage(playerid,COLOR_RED,"{ffffff}Veнculo:{9f9f9f}Bullet{ffffff}Dono:{0082fb}Felipe_Freeze{ffffff}.");
               RemovePlayerFromVehicle(playerid);
               TogglePlayerControllable(playerid, 1);
               return 1;
            }
        }
        if(vId==vipcar[4])
        {
            new nome[24];
            GetPlayerName(playerid, nome, sizeof nome);
            if(strfind(nome, "Felipe_Freeze", true) == 0)
                        {
               SendClientMessage(playerid,COLOR_LIGHTBLUE,"{ffffff}Bem vindo ao seu {9f9f9f}Monster {01b333}Felipe_Freeze{ffffff}.");
               return 1;
            }
            else
            {
               SendClientMessage(playerid,COLOR_RED,"{ffffff}Veнculo:{9f9f9f}Monster{ffffff}Dono:{0082fb}Felipe_Freeze{ffffff}.");
               RemovePlayerFromVehicle(playerid);
               TogglePlayerControllable(playerid, 1);
               return 1;
            }
        }
        if(newcar==582||newcar==488)
        {
            if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9){ }
            else
            {
                SendClientMessage(playerid, COLOR_RED, "{FF3D3D}[Erro]{FFFFFF} Vocк nгo й da San News.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
            if(PlayerInfo[playerid][pRank] < 4 && newcar == 488)
            {
                SendClientMessage(playerid, COLOR_RED, "{FF3D3D}[Erro]{FFFFFF} Seus pontos de San News sгo insuficientes para usar o Helicoptero da San News.");
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(newcar==571)
        {
            if(PlayerKarting[playerid] != 1)
            {
                RemovePlayerFromVehicle(playerid);
                TogglePlayerControllable(playerid, 1);
            }
        }
        if(vid==AluguelCar[0]||vid==AluguelCar[1]||vid==AluguelCar[2])
        {
            if (HireCar[playerid] != GetPlayerVehicleID(playerid))
            {
                format(string, sizeof(string), "~w~Voce pode alugar essa moto~n~Valor: ~g~R$ %d ~n~~w~para alugar digite ~g~/alugarcarro~w~~n~para sair, ~r~/sair",SBizzInfo[0][sbEntranceCost]);
                TogglePlayerControllable(playerid, 0);
                GameTextForPlayer(playerid, string, 5000, 3);
            }
        }
        if(vid==AluguelCar[3]||vid==AluguelCar[4]||vid==AluguelCar[5]||vid==AluguelCar[6]||vid==AluguelCar[7]||vid==AluguelCar[8]||vid==AluguelCar[9])
        {
            if (HireCar[playerid] != GetPlayerVehicleID(playerid))
            {
                format(string, sizeof(string), "~w~Voce pode alugar este carro~n~Valor: ~g~R$ %d ~n~~w~para alugar digite ~g~/alugarcarro~w~~n~para sair, ~r~/sair",SBizzInfo[1][sbEntranceCost]);
                TogglePlayerControllable(playerid, 0);
                GameTextForPlayer(playerid, string, 5000, 3);
            }
        }
        if(oldcar != 301)
        {
            if((housecar != oldcar && oldcar != 0) && (HireCar[playerid] != oldcar && newcar != housecar))
            {
                if(gLastDriver[oldcar] == playerid && oldcar != newcar)
                {
                    gLastDriver[oldcar] = 300;
                    gCarLock[oldcar] = 0;
                    UnLockCar(oldcar);
                }
            }
        }
        gLastCar[playerid] = GetPlayerVehicleID(playerid);
        gLastDriver[GetPlayerVehicleID(playerid)] = playerid;
    }
    if(newstate == PLAYER_STATE_SPAWNED)
    {
        new Float: lwx, Float:lwy, Float:lwz;
        GetPlayerPos(playerid, lwx, lwy, lwz);
        if((lwz > 530.0 && PlayerInfo[playerid][pInt] == 0) || PlayerToPoint(1000.0, playerid, -1041.9,-1868.4,79.1)) //the highest land point in sa = 526.8
        {
            SetPlayerSpawn(playerid);
        }
        if(WantedPoints[playerid] > 0 && PlayerInfo[playerid][pMember] != 21)
        {
            new dstring[128];
            new wanted = WantedPoints[playerid];
            new diecash = 0;
            while(WantedPoints[playerid] > 0)
            {
                diecash += 100;
                WantedPoints[playerid] -=1;
                SetPlayerWantedLevel(playerid, WantedPoints[playerid]);
            }
            format(dstring, sizeof(dstring), "Vocк perdeu R$ %d por morrer em fuga de procurado sob nнvel: %d.", diecash, wanted);
            SendClientMessage(playerid, COLOR_YELLOW, dstring);
            WantedPoints[playerid] = 0;
            SetPlayerWantedLevel(playerid, WantedPoints[playerid]);
            GivePlayerGP(playerid, - diecash);
            PlayerInfo[playerid][pWantedDeaths] += 1;
        }
        WantedPoints[playerid] = 0;
        SetPlayerWantedLevel(playerid, WantedPoints[playerid]);
        TelePos[playerid][0] = 0.0;
        TelePos[playerid][1] = 0.0;
        gPlayerSpawned[playerid] = 1;
        SafeTime[playerid] = 60;
        if(PlayerInfo[playerid][pDonateRank] == 0)
        {
            new Float:hp = 50.0+PlayerInfo[playerid][pSHealth];
            SetPlayerHealth(playerid, hp);
        } else {
            SetPlayerHealth(playerid, 50.0);
        }
    }
    return 1;
}
Reply
#6

Remove o Toggle e testa rapidinho =X
Reply
#7

Quote:
Originally Posted by Itachi_Uchiha
Посмотреть сообщение
Remove o Toggle e testa rapidinho =X
nгo deu certo
Reply
#8

pawn Код:
public OnPlayerStateChange( playerid, newstate, oldstate)
{
                if ( newstate == PLAYER_STATE_DRIVER)
                {
                new vid = GetPlayerVehicleID( playerid)   ;
                if ( vid==Alqaedacars[0]||vid==Alqaedacars[1]||vid==Alqaedacars[2]||vid==Alqaedacars[3]||vid==Alqaedacars[4]||vid==Alqaedacars[5]||vid==Alqaedacars[6]||vid==Alqaedacars[7]||vid==Alqaedacars[8]||vid==Alqaedacars[9])
                {
            if(PlayerInfo[playerid][pMember] != 22||PlayerInfo[playerid][pLeader] != 22) {  }
                else
                {
                SendClientMessage ( playerid ,  COLOR_RED ,  "{FF3D3D}[Erro]{FFFFFF} Vocк nгo й da Alqaeda.");
                RemovePlayerFromVehicle( playerid)   ;
                TogglePlayerControllable( playerid, 1)   ;
                }
                }
                }
                return 1;
}
Vк se dб certo.
Reply
#9

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    for(new i = 0; i < sizeof(Alqaedacars); i ++)
        {
            if(vehicleid == Alqaedacars[i])
            {
                if(PlayerInfo[playerid][pLeader] != 22 && PlayerInfo[playerid][pMember] != 22)
                {
                    SendClientMessage(playerid,COLOR_RED,"{FF3D3D}[Erro]{FFFFFF} Vocк nгo й da Alqaeda.");
                    RemovePlayerFromVehicle(playerid);
                    TogglePlayerControllable(playerid, 1);
                }
            }
        }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)