Problema con /seguro
#2

Lo solucionй, simplemente hice un nuevo comando integrando este stock:
pawn Код:
stock GetClosestVehicle(playerid, Float:range)
{
    new     Float:p_X;
    new     Float:p_Y;
    new     Float:p_Z;

    new     Float:Distance;
    new     Float:PretendentDistance = range +1;
    new     Pretendent;

    GetPlayerPos(playerid, p_X, p_Y, p_Z);

    for(new vehicleid=1; vehicleid < MAX_VEHICLES; vehicleid++)
    {
        Distance = GetVehicleDistanceFromPoint(vehicleid, p_X, p_Y, p_Z);

        if(Distance <= range && Distance <= PretendentDistance)
        {
            Pretendent = vehicleid;
            PretendentDistance = Distance;
        }
    }

    return Pretendent;
}
Reply


Messages In This Thread
Problema con /seguro - by FullCircle - 26.07.2014, 18:13
Respuesta: Problema con /seguro - by FullCircle - 27.07.2014, 20:48

Forum Jump:


Users browsing this thread: 2 Guest(s)