Faction Cars = Server Log problems
#5

Don't use numbers like this as it causes more problems in the long run. Use sizeof operator. You also forgot to close a bracket on the first loop.

Код:
for (new i = 0; i < sizeof GSFcar; i++)
{
    if (vehicleid == GSFcar[i]) //If the vehicleid is an LSPD vehicle
    {
        if (pData[playerid][Faction] != 1) //If the player is not in faction 1 (LSPD, in this case)
        {
            ClearAnimations(playerid); //Clears their animation, preventing them from entering the vehicle.
            SendClientMessage(playerid, -1, "You don`t have the keys for this car."); //Sends a message to the player that he cannot enter it.
        }
    }
}

for (new i = 0; i < sizeof Pizzacar; i++)
{
    if (vehicleid == Pizzacar[i]) //If the vehicleid 
    {
        if (PlayerInfo[i][team] != TEAM_LSDOS)
        {
            ClearAnimations(playerid); //Clears their animation, preventing them from entering the vehicle.
            SendClientMessage(playerid, -1, "You don`t have the keys for this car."); //
        }
    }
}
Reply


Messages In This Thread
Faction Cars = Server Log problems - by tbedy - 21.12.2017, 00:56
Re: Faction Cars = Server Log problems - by Abagail - 21.12.2017, 00:59
Re: Faction Cars = Server Log problems - by tbedy - 21.12.2017, 01:22
Re: Faction Cars = Server Log problems - by tbedy - 21.12.2017, 01:25
Re: Faction Cars = Server Log problems - by Konstantinos - 21.12.2017, 08:21
Re: Faction Cars = Server Log problems - by tbedy - 21.12.2017, 15:40
Re: Faction Cars = Server Log problems - by tbedy - 21.12.2017, 16:08
Re: Faction Cars = Server Log problems - by tbedy - 21.12.2017, 16:24
Re: Faction Cars = Server Log problems - by Konstantinos - 22.12.2017, 08:57

Forum Jump:


Users browsing this thread: 1 Guest(s)