05.07.2010, 20:10
I'm trying to make so that when you enter a faction vehicle and you aren't a faction member of the faction the vehicle is associated with, you will get kicked out of it.
The problem is that it does nothing when you enter a faction vehicle, all vehicles in the game, both owned and everything is in the same table(mysql). If they are a factionvehicle they got 1 in FactionVeh, kinda as shown in code. Hope somebody can help me with this!
Thanks for reading!
pawn Код:
for(new i = 0; i < sizeof(CarInfo); i++)
{
if(CarInfo[i][FactionVeh] == 1)
{
if(PlayerAccount[playerid][Faction] == CarInfo[i][FactionID]) return 0;
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,COLOR_RED,"[!] You are not in this faction! You cannot drive this vehicle[!]");
return 1;
}
}
}
Thanks for reading!