#2

you need a variable for cars like..
pawn Код:
new isFactionVehilce[701]; // 701 and id 0 won't be used
and you do isFactionVehicle[vehicleid] = 1; // do this when you add the vehicle. example:
pawn Код:
/*OnGameModeInit*/
new car = CreateVehicle(/*parameters here*/);
isFactionVehicle[car] = 1;
now all that is left is do a check.
pawn Код:
/*OnPlayerStateChange*/
if(newstate == PLAYER_STATE_DRIVER)
{
if(isFactionVehicle[GetPlayerVehicleID(playerid)])
{
SendClientMessage(playerid, 0xFFFFFFFF/*or any other color*/, "You may not drive this vehicle!");
RemovePlayerFromVehicle(playerid);
}
}
of course you may set the value isFactionVehicle to the id of the team/faction and check if player's team is equa to the faction and if that's the case don't remove him. uh... you should do it that way. this is just an example


USE SEARCH, B****!!
Reply


Messages In This Thread
How? - by Magneeto - 31.05.2009, 04:13
Re: How? - by Ignas1337 - 31.05.2009, 04:40
Re: How? - by Magneeto - 31.05.2009, 05:17
Re: How? - by Ignas1337 - 31.05.2009, 05:20

Forum Jump:


Users browsing this thread: 1 Guest(s)