Speed Player/Veh And HP
#4

Quote:
Originally Posted by [IKS]Niko_Hs™
Посмотреть сообщение
Replace your code with :

Код:
#include <a_samp>

public OnPlayerConnect(playerid)
{
	GetPlayerSpeed(playerid);
	GetVehicleSpeed(GetPlayerVehicleID(playerid));
	GetVehicleHP(GetPlayerVehicleID(playerid));
	return 1;
}

stock GetPlayerSpeed(playerid)
{
        if(playerid != INVALID_PLAYER_ID)
        {
                new Float:Pos[3],Float:PS;
                GetPlayerVelocity(playerid, Pos[0], Pos[1], Pos[2]);
                PS = floatsqroot(Pos[0]*Pos[0] + Pos[1]*Pos[1] + Pos[2]*Pos[2])*200;
                return floatround(PS,floatround_round);
        }
        return INVALID_PLAYER_ID;
}

stock GetVehicleSpeed(vehicleid)
{
        if(vehicleid != INVALID_VEHICLE_ID)
        {
                new Float:Pos[3],Float:VS ;
                GetVehicleVelocity(vehicleid, Pos[0], Pos[1], Pos[2]);
                VS = floatsqroot(Pos[0]*Pos[0] + Pos[1]*Pos[1] + Pos[2]*Pos[2])*200;
                return floatround(VS,floatround_round);
        }
        return INVALID_VEHICLE_ID;
}
You missed third. GetVehicleHP.
Reply


Messages In This Thread
Speed Player/Veh And HP - by Hervest1998 - 23.07.2012, 10:26
Re: Speed Player/Veh And HP - by RedJohn - 23.07.2012, 10:34
Re: Speed Player/Veh And HP - by [IKS]Niko_Hs™ - 23.07.2012, 10:38
Re: Speed Player/Veh And HP - by RedJohn - 23.07.2012, 10:41
Re: Speed Player/Veh And HP - by Hervest1998 - 23.07.2012, 10:41

Forum Jump:


Users browsing this thread: 1 Guest(s)