ammobox
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
|
||||
const Natives = {
|
||||
SET_BLIP_CATEGORY: RageEnums.Natives.Ui.SET_BLIP_CATEGORY,
|
||||
SHOW_HEADING_INDICATOR_ON_BLIP: RageEnums.Natives.Ui.SHOW_HEADING_INDICATOR_ON_BLIP,
|
||||
SET_BLIP_AS_SHORT_RANGE: RageEnums.Natives.Ui.SET_BLIP_AS_SHORT_RANGE,
|
||||
SET_BLIP_DISPLAY: RageEnums.Natives.Ui.SET_BLIP_DISPLAY
|
||||
};
|
||||
|
||||
export default function playerBlips() {
|
||||
|
||||
@@ -36,7 +30,6 @@ export default function playerBlips() {
|
||||
let color = player.getVariable("blipColor");
|
||||
pBlip.setColour(isNaN(color) ? 0 : color);
|
||||
pBlip.setPosition(player.position.x, player.position.y, player.position.z);
|
||||
//pBlip.setRotation(player.heading);
|
||||
});
|
||||
}, 50);
|
||||
|
||||
@@ -54,24 +47,6 @@ export default function playerBlips() {
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
mp.events.add("entityStreamIn", async (entity) => {
|
||||
await mp.game.waitAsync(100);
|
||||
if (entity.type === "player") {
|
||||
let color = parseInt(entity.getVariable("blipColor"));
|
||||
if (entity.blip == 0) entity.createBlip(1);
|
||||
|
||||
entity.setBlipColor(isNaN(color) ? 0 : color);
|
||||
|
||||
mp.game.invoke(Natives.SET_BLIP_CATEGORY, entity.blip, 7);
|
||||
mp.game.invoke(Natives.SHOW_HEADING_INDICATOR_ON_BLIP, entity.blip, true);
|
||||
mp.game.invoke(Natives.SET_BLIP_AS_SHORT_RANGE, entity.blip, true);
|
||||
mp.game.invoke(Natives.SET_BLIP_DISPLAY, entity.blip, 8);
|
||||
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
|
||||
mp.events.addDataHandler("blipColor", (entity, value) => {
|
||||
if (entity.type === "player") {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
export default function attachmentManager(game: IGame) {
|
||||
mp.events.add("SERVER:LoadAttachments", () => {
|
||||
attachmentMngr.register("char_creator_1", "prop_beggers_sign_04", 28422, new mp.Vector3(0, 0, 0), new mp.Vector3(0, 0, 0));
|
||||
attachmentMngr.register("ammobox", "gr_prop_gr_crate_mag_01a", "PH_L_Hand", new mp.Vector3(0, -0.18, -0.18), new mp.Vector3(0, 0, 0));
|
||||
attachmentMngr.register("ammobox", "gr_prop_gr_crate_mag_01a", "PH_L_Hand", new mp.Vector3(0, 0, 0), new mp.Vector3(0, 0, 0));
|
||||
attachmentMngr.register("binbag", "prop_cs_rub_binbag_01", 28422, new mp.Vector3(0.08, 0.0, -0.03), new mp.Vector3(270.0, 0.0, 25.0));
|
||||
attachmentMngr.register("weapondeal", "ex_prop_crate_ammo_bc", "chassis_dummy", new mp.Vector3(0.08, -0.9, -0.2), new mp.Vector3(0, 0, 0));
|
||||
attachmentMngr.register("weapondeal1", "ex_office_swag_guns02", "chassis_dummy", new mp.Vector3(0, 0.8, 0), new mp.Vector3(0, 0, 0));
|
||||
|
||||
@@ -136,19 +136,19 @@ public class AttachmentSyncExample : Script
|
||||
player.AddAttachment(Base36Extensions.FromBase36(hash), true);
|
||||
}
|
||||
|
||||
//[Command("xdd")]
|
||||
[Command("xdd")]
|
||||
public void attachment(Player player)
|
||||
{
|
||||
Vehicle veh = player.Vehicle;
|
||||
if (!veh.HasAttachment("weapondeal"))
|
||||
if (!player.HasAttachment("ammobox"))
|
||||
{
|
||||
veh.AddAttachment("weapondeal", false);
|
||||
player.AddAttachment("ammobox", false);
|
||||
//veh.AddAttachment("weapondeal1", false);
|
||||
//veh.AddAttachment("weapondeal2", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
veh.ClearAttachments();
|
||||
player.ClearAttachments();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user