20.02.2011, 23:41
Hey guys, got a question. I have taxis set to the taxi drive faction in my gamemode. For some reason, it allows civilians to enter the taxis. I have the exact same code for the police vehicles and it works on those. Can anyone help? Here is the code:
pawn Код:
if(newstate == 2)
{
new CarCheck = GetPlayerVehicleID(playerid);
if(CarCheck == Cars[taxi1] || CarCheck == Cars[taxi2] || CarCheck == Cars[taxi3] || CarCheck == Cars[taxi4] || CarCheck == Cars[taxi5] || CarCheck == Cars[taxi6])
{
if(gTeam[playerid] != 3)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "You are not a taxi driver!");
return 1;
}
else
{
return 1;
}
}
return 1;
}