Need help with cars
#8

On top:
Код:
#define COLOR_DARKRED 0xAA3333AA
Somewhere:
Код:
forward ReservedCar(carid);
public ReservedCar(carid)
{
	if(carid == Car1 || carid == Car2 || carid == Car3 || carid == Car4 || carid == Car5 || carid == Car6) //change the ids to ids of the reserved vehicles
	{
		return 1;
	}
	return 0;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new newcar = GetPlayerVehicleID(playerid);
	if(ReservedCar(newcar))
	{
 		if(gTeam[playerid] == 30) { } //you can drive it if you are a faction member Member of the choosen faction
 		else //this will happen if someone else enters the vehicle and if he is not in the faction
 		{
    	RemovePlayerFromVehicle(playerid);
    	SendClientMessage(playerid, COLOR_DARKRED,".: [RESERVED VEHICLE] You can't drive this vehicle :.");
 		}
	}
	return 1;
}
Reply


Messages In This Thread
Need help with cars - by ghost_in_dark - 30.12.2008, 11:23
Re: Need help with cars - by Khelif - 30.12.2008, 12:11
Re: Need help with cars - by Nero_3D - 30.12.2008, 12:14
Re: Need help with cars - by Khelif - 30.12.2008, 12:17
Re: Need help with cars - by Nero_3D - 30.12.2008, 12:19
Re: Need help with cars - by SantarioLeone - 30.12.2008, 19:10
Re: Need help with cars - by ghost_in_dark - 01.01.2009, 08:32
Re: Need help with cars - by introzen - 01.01.2009, 12:25
Re: Need help with cars - by ghost_in_dark - 01.01.2009, 13:40
Re: Need help with cars - by Peter_Corneile - 11.04.2009, 15:38

Forum Jump:


Users browsing this thread: 1 Guest(s)