A small problem!!!
#3

to check for the vehicle types (id), you need the GetVehicleModel(vehicleid) , maybe you need to include a GetVehicleSpeed?
Код:
public OnPlayerUpdate(playerid)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	new modelid= GetVehicleModel(vehicleid);
	if(IsPlayerInAnyVehicle(playerid) && modelid == 437 && GetPlayerSpeed(playerid) > 60 && gBreakDown[playerid] == 0)
	{
		gBreakDown[playerid] = 1;
		SendClientMessage(playerid,COLOR_RED,"A bomb has been planted in your bus and if you slow down below 40 km/h,you'll be blowed up");
	}
	if(IsPlayerInAnyVehicle(playerid) && modelid == 437 && gBreakDown[playerid] == 1 && GetPlayerSpeed(playerid) < 41)
	{
		gBreakDown[playerid] = 0;
		SendClientMessage(playerid,COLOR_RED,"You didn't obey the rule,BYE BYE!!!");
		SetVehicleHealth(vehicleid,0);
	}
	return 1;
}
Reply


Messages In This Thread
A small problem!!! - by Cjgogo - 24.06.2011, 08:15
Re: A small problem!!! - by Cjgogo - 24.06.2011, 09:22
Re: A small problem!!! - by Babul - 24.06.2011, 10:32
Re: A small problem!!! - by Cjgogo - 24.06.2011, 12:47
Re: A small problem!!! - by Cjgogo - 24.06.2011, 13:45
Re: A small problem!!! - by Vince - 24.06.2011, 14:05

Forum Jump:


Users browsing this thread: 3 Guest(s)