I need help with my train horn
#2

Use GetVehicleModel
Код:
TrainAirhornSwitch(playerid)
{
	new vid = GetPlayerVehicleID(playerid);
	new vmodel = GetVehicleModel(vid);
	if(vmodel == 537|| vmodel == 538)
	{
		new Float:X, Float:Y, Float:Z;
		GetVehiclePos(vid, X, Y, Z);
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerInRangeOfPoint(i, 30, X, Y, Z))
			{
				PlayerPlaySound(i, 3201, 0, 0, 0);
			}
		}
	}
	return 1;
}
Also it would be the best if the sound plays from the train position than max volume at player's position, maybe?
Код:
PlayerPlaySound(i, 3201, X, Y, Z);
Reply


Messages In This Thread
I need help with my train horn - by tboysamp - 30.06.2015, 06:47
Re: I need help with my train horn - by RoboN1X - 30.06.2015, 07:08
Re: I need help with my train horn - by tboysamp - 30.06.2015, 07:36

Forum Jump:


Users browsing this thread: 1 Guest(s)