Siren thingy
#1

Would this work?

Код:
public OnVehicleSirenStateChange(playerid, vehicleid, newstate)
{
	new siren = GetVehicleParamsSirenState(vehicleid);
	if(PLAYER_STATE_DRIVER && ServerVehicle[vehicleid][Type] == VEHICLE_TYPE_GLOBAL)
	{
	    if(siren == 1)
		{
			siren = 0;
			return 1;
		}
		else
	    {
			siren = 1;
			return 1;
	    }
	}
	return 1;
}
Reply
#2

A local variable is set, but it isn't used afterwards so this code does absolutely nothing at all. GetVehicleParamsSirenState is also completely redundant because you already have the newstate parameter which contains that value.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)