SA-MP Forums Archive
[Duda] Radar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Duda] Radar (/showthread.php?tid=268985)



[Duda] Radar - rubensm - 14.07.2011

Buenas, pues pongo esta duda para ver si alguien me podrнa ayudar a crear un Radar de velocidad para un servidor de Rp, he buscado pero no se como hacerlos.


Re: [Duda] Radar - MrDeath537 - 14.07.2011

їRadar de velocidad? їVelocнmetro?


Respuesta: [Duda] Radar - rubensm - 14.07.2011

Radar de velocidad, que detecte la velocidad del vehнculo, y si sobrepasa el limite establecido en esa zona, pues avisaria a sapd.

PD: Lo de avisar lo pondrнa yo, pero no se como hacer para detectar la velocidad


Respuesta: [Duda] Radar - SuperMarioRol - 14.07.2011

https://sampwiki.blast.hk/wiki/GetVehicleVelocity y https://sampwiki.blast.hk/wiki/GetPlayerVelocity


Respuesta: [Duda] Radar - rubensm - 14.07.2011

SuperMarioRol, їY cуmo harнa para que me de la velocidad en Km/H por ejemplo?, todo en un ъnico valor


Re: [Duda] Radar - MrDeath537 - 14.07.2011

pawn Код:
stock
    GetVehicleSpeed(vehicleid)
    {
        new
            Float: x,
            Float: y,
            Float: z;

        GetVehicleVelocity(vehicleid, x, y, z);
        return floatround((floatmul(floatsqroot(floatpower(x, 2.0) + floatpower(y, 2.0) + floatpower(z, 2.0)), 100.0) / 0.4463), floatround_floor);
    }
La funciуn original convertia a MP/H, pero yo la modifiquй un poco basandome en el handling del Turismo. Si no estб mal el valor es casi KMP/H.


Respuesta: [Duda] Radar - leoals - 14.07.2011

Creo que vi un FS de velocimetro que tenia un limite de velocidad, usa el buscador y editalo


Respuesta: [Duda] Radar - SuperMarioRol - 14.07.2011

Excelente y ъtil funciуn, MrDeath, como dirнa Chaoz, podrнas haber ahorrado unas lineas XD