Problem vith this script
#2

Try this:
Код:
#include <a_samp>

new engine, lights, alarm, doors, bonnet, boot, objective;

public OnPlayerUpdate(playerid)
{
	new Float:health, veh = GetPlayerVehicleID(playerid);

	if( health < 500 )
	{
		if( GetPVarInt( playerid, "MessageSent" ) == 0 )
		{
			GetVehicleParamsEx( veh, engine, lights, alarm, doors, bonnet, boot, objective );
			SetVehicleParamsEx( veh, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective );
			SendClientMessage( playerid, 0xCC0000FF, "{FFFFFF}Your car is broken. Type{00FFFF}/assistance. {FFFFFF}." );
			
			SetPVarInt( playerid, "MessageSent", 1 );
		}
	}
	else if( health > 500 )
	{
		GetVehicleParamsEx( veh, engine, lights, alarm, doors, bonnet, boot, objective );
		SetVehicleParamsEx( veh, VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective );
		SetPVarInt( playerid, "MessageSent", 0 );
	}
	return 1;
}
Reply


Messages In This Thread
Problem vith this script - by AlexMedrea - 07.03.2012, 18:48
Re: Problem vith this script - by IstuntmanI - 07.03.2012, 19:34
Re: Problem vith this script - by AlexMedrea - 07.03.2012, 19:56
Re: Problem vith this script - by CAR - 07.03.2012, 20:02
Re: Problem vith this script - by AlexMedrea - 07.03.2012, 20:17

Forum Jump:


Users browsing this thread: 1 Guest(s)