4 warnings
#9

Full code at 2 warning's:

Код:
public VehicleDamageToPlayerHealth(playerid, vehicleid)
{
   	if (IsPlayerInVehicle(playerid,vehicleid))
	{
		if(Seatbelt[playerid] == 1)
		{
  			GetVehicleHealth(vehicleid, VehicleHealthStack[vehicleid][0]);
   			if (floatcmp(VehicleHealthStack[vehicleid][0], VehicleHealthStack[vehicleid][1]) == -1)
    		{
    	       	GetPlayerHealth(playerid, VehicleHealthStack[vehicleid][2]);
    	       	SetPlayerHealth(playerid, floatsub(VehicleHealthStack[vehicleid][2], 6));
    	       	if(GetPlayerHealth(playerid) >= 1)
				{
				    SendClientMessage(playerid,COLOR_CORAL,"You are shook up from the collision.");
				    SendClientMessage(playerid,COLOR_CORAL,"Luckily, you were wearing your seatbelt and may continue driving.");
				}
				else
				{
				    SendClientMessage(playerid,COLOR_CORAL,"Your stamina was in bad condition and the force of the collision knocked you out.");
					GameTextForPlayer(playerid,"~r~Out ~w~cold",4000,1);
				}
    		}
    	   	VehicleHealthStack[vehicleid][1] = VehicleHealthStack[vehicleid][0];
    	   	return 1;
   		}
		else
		{
			GetVehicleHealth(vehicleid, VehicleHealthStack[vehicleid][0]);
   			if (floatcmp(VehicleHealthStack[vehicleid][0], VehicleHealthStack[vehicleid][1]) == -1)
    		{
    	       	GetPlayerHealth(playerid, VehicleHealthStack[vehicleid][2]);
    	       	SetPlayerHealth(playerid, floatsub(VehicleHealthStack[vehicleid][2], 45));
    	       	if(GetPlayerHealth(playerid) >= 1)
				{
				    SendClientMessage(playerid,COLOR_CORAL,"You are shook up from the collision.");
				    SendClientMessage(playerid,COLOR_CORAL,"You can not continue driving, as you are frozen from shock. Buckle up, next time.");
					TogglePlayerControllable(playerid, 0);
					TimerStack = SetTimerEx("DisablePlayerKnockout",3500,1,"i",playerid);
				}
				else
				{
				    SendClientMessage(playerid,COLOR_CORAL,"Your stamina was in bad condition and the force of the collision knocked you out.");
					GameTextForPlayer(playerid,"~r~Out ~w~cold",4000,1);
				}
    		}
    	   	VehicleHealthStack[vehicleid][1] = VehicleHealthStack[vehicleid][0];
    	   	return 1;
		}
	}
	return 1;
}
Reply


Messages In This Thread
4 warnings - by Typhome - 21.08.2010, 04:15
Re: 4 warnings - by Sky4D - 21.08.2010, 04:29
Re: 4 warnings - by willsuckformoney - 21.08.2010, 04:35
Re: 4 warnings - by michaelw352 - 21.08.2010, 04:52
Re: 4 warnings - by Typhome - 21.08.2010, 05:05
Re: 4 warnings - by Sky4D - 21.08.2010, 05:07
Re: 4 warnings - by Typhome - 21.08.2010, 05:08
Re: 4 warnings - by Sky4D - 21.08.2010, 05:10
Re: 4 warnings - by Typhome - 21.08.2010, 05:12
Re: 4 warnings - by Kyosaur - 21.08.2010, 05:15

Forum Jump:


Users browsing this thread: 1 Guest(s)