Vehicle Health
#1

this is always returning player can't drive...

Код:
			case MAX_DRIVERTEST_CP:
			{
			    new string[125];
			    DisablePlayerCheckpoint(playerid);
			    DrivingStep[playerid] = 0;
			    new Float:vehp;

				if(GetVehicleHealth(v,vehp) < 750)
				{
					format(string, sizeof(string), "Player (%d) Cant Driver For ****..someone call him a Taxi!!", playerid);
					// Add Var to Set Licese Licese[playerid] = 1;
				}
				else
				{
				    format(string, sizeof(string), "Player (%d) Passed His Drivers Test, we are no longer safe on the streets!", playerid);
                    // Add Var to Set TAKE Licese Just in case of Bug ( Licese[playerid] = 0; )
				}
				SendClientMessageToAll(COLOR_LIGHTRED, string);
				DrivingTest[playerid] = 0;
			}
		}
	}
Reply
#2

Try this not tested but maybe will work.
pawn Код:
case MAX_DRIVERTEST_CP:
{
    new string[125],Float:vehp;
    DisablePlayerCheckpoint(playerid);
    DrivingStep[playerid] = 0;
    GetVehicleHealth(v,vehp);

    if(vehp < 750)
    {
        format(string, sizeof(string), "Player (%d) Cant Drive For ****..someone call him a Taxi!!", playerid);
        SendClientMessageToAll(COLOR_LIGHTRED, string);
    }
    else if(vehp >= 750)
    {
        format(string, sizeof(string), "Player (%d) Passed His Drivers Test, we are no longer safe on the streets!", playerid);
        SendClientMessageToAll(COLOR_LIGHTRED, string);
    }
    DrivingTest[playerid] = 0;
}
Reply
#3

awesome thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)