Vehicle Health Command, Is broken, Need help !!
#1

pawn Код:
if(strcmp(cmd, "/vhealth", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
           
            new carid;
            carid = GetPlayerVehicleID(playerid);

            if(IsPlayerInAnyVehicle(playerid))
            {
            if(IsAnOwnableCar(carid))
            {
            new Float:health;
            GetVehicleHealth(carid, health);
            if(health <350) return SendClientMessage(playerid,COLOR_LIGHTRED,"Vehicle Health: Damaged!!");
            if(health >351) return SendClientMessage(playerid,COLOR_GREEN,"Vehicle Health: Good!!");
            }
            else
            {
            SendClientMessage(playerid, COLOR_GREY, "* You are not in a vehicle!");
            return 1;
        }
        return 1;
    }
}
}
Problem is, It doesn't say You are not in a vehicle.

Please could someone check this, and fix for me?

Thankyou.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)