ahh ok m8 here's one of the scripts using it this is the main battle tank
g_mech=0
-------------------- HUD Locations and Sizes --------------------
-- HUD BG --
--sprite location
local HUD_spr_posx = 0
local HUD_spr_posy = 0
--sprite size
local HUD_spr_sizex = 100
local HUD_spr_sizey = 100
function devastator_init(e)
-- HUD BG --
HUD_sprite = LoadImage("scriptbank\\images\\devastator\\000.png")--location of the HUD
HUD_icon = CreateSprite(HUD_sprite)
SetSpriteSize (HUD_icon,HUD_spr_sizex,HUD_spr_sizey)
SetSpriteDepth (HUD_sprite, 100)
SetSpritePosition(HUD_icon,300,300)
end
local mod = math.modf
function devastator_main(e)
-------------------- HUD BG --------------------
if GetScancode() == 2 then PlaySound(e,1)--gun sound
end
if GetScancode() == 3 then PlaySound(e,0)--gun sound
end
g_mech=1
if g_mech == 1 then
PasteSpritePosition(HUD_icon,HUD_spr_posx,HUD_spr_posy)
HideHuds()
AddPlayerWeapon(42)--gun added from map
AddPlayerWeapon(43)--gun2 added from map
PositionCamera( 0, g_PlayerPosX, g_PlayerPosY + 290, g_PlayerPosZ)
end
if g_KeyPressW == 1 or g_KeyPressS == 1 or g_KeyPressA == 1 or g_KeyPressD == 1 then
LoopSound(e,2)-- footfall sound
stopped_moving = 1
else
StopSound(e,2) -- stop footfall sound
if stopped_moving == 1 then
PlaySound(e,3)--play engine winddown sound
stopped_moving = 0
end
end
end
lines 41 and 42 add the weapon
and the ammo display is on a non static entity
-- script by Honkeyboy
g_RPG_Gold = 0
g_kills = 0
g_kills2 = 0
g_kills3 = 0
g_salvage = 0
function display_init(e)
end
function display_main(e)
PlayerDX = g_Entity[e]['x'] - g_PlayerPosX;
PlayerDY = g_Entity[e]['y'] - g_PlayerPosY;
PlayerDZ = g_Entity[e]['z'] - g_PlayerPosZ;
PlayerDist = math.sqrt(math.abs(PlayerDX*PlayerDX)+math.abs(PlayerDY*PlayerDY)+math.abs(PlayerDZ*PlayerDZ));
if PlayerDist > 10 then
TextColor(2,37,3,"Collected Currency",10,255,10)
TextColor(2,40,3,"Salvage ["..g_salvage.."]",10,192,10)
TextColor(2,43,3,"Credits ["..g_RPG_Gold.."]",10,192,10)
TextColor(2,46,3,"Enimies Killed",10,255,10)
TextColor(2,49,3,"Troops ["..g_kills.."]",10,192,10)
TextColor(2,52,3,"Brigands ["..g_kills2.."]",10,192,10)
TextColor(2,55,3,"Generals ["..g_kills3.."]",10,192,10)
end
end
Intel i5 4950 Quad core 3.3ghz AMD FX 6300 x6 cores 3.5ghz(unclocked)
8gb Ram 8gb Ram
AMD Radeon 7570 1gb AMD Radeon HD 6670 2gb
and a well fed mouse on a wheel
I only smile because i have absolutely no idea whats going on