21.12.2017, 08:21
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."); // } } }