Ragemp-roleplay-skript/Voice/VoiceRangeDisplay.js
2019-04-16 13:59:07 +02:00

21 lines
No EOL
1.4 KiB
JavaScript

API.onUpdate.connect(function ()
{
if (!API.getHudVisible()) return;
var player = API.getLocalPlayer();
var res_X = API.getScreenResolutionMaintainRatio().Width;
var rotation = 0;
if (API.getEntitySyncedData(player, "VOICE_RANGE") == null) {
API.drawText("Normal", parseInt(res_X) - 60, 300, 1, 115, 186, 131, 255, 4, 2, false, true, 0);
API.dxDrawTexture("images//normal.png", new Point(parseInt(res_X) - 55, 310), new Size(50, 50), rotation);
}else if(API.getEntitySyncedData(player, "VOICE_RANGE") == "Normal"){
API.drawText("Normal", parseInt(res_X) - 60, 300, 1, 115, 186, 131, 255, 4, 2, false, true, 0);
API.dxDrawTexture("images//normal.png", new Point(parseInt(res_X) - 55, 310), new Size(50, 50), rotation);
}else if(API.getEntitySyncedData(player, "VOICE_RANGE") == "Weit"){
API.drawText("Weit", parseInt(res_X) - 60, 300, 1, 115, 186, 131, 255, 4, 2, false, true, 0);
API.dxDrawTexture("images//laut.png", new Point(parseInt(res_X) - 55, 310), new Size(50, 50), rotation);
}else if(API.getEntitySyncedData(player, "VOICE_RANGE") == "Kurz"){
API.drawText("Kurz", parseInt(res_X) - 60, 300, 1, 115, 186, 131, 255, 4, 2, false, true, 0);
API.dxDrawTexture("images//leise.png", new Point(parseInt(res_X) - 55, 310), new Size(50, 50), rotation);
}
});