Scripts / Dx9 note script

Author
Message
vincenthendriks
8
Years of Service
User Offline
Joined: 5th Nov 2016
Playing: A whole lot of different things.
Posted: 30th Jun 2018 07:21 Edited at: 30th Jun 2018 07:24
I've looked everywhere, found a few, but none seem to work for dx9, could someone help me out here?


I've tried to edit it to work but I couldn't get far, not to mention the dx11 scripts all use utillib.lua which dx9 doesn't have.

I did point it to the right file path, got the right thingy's, I'm not sure what to do to get it to work without requiring dx11.

Attachments

Login to view attachments
vincenthendriks
8
Years of Service
User Offline
Joined: 5th Nov 2016
Playing: A whole lot of different things.
Posted: 30th Jun 2018 07:49
This is the full script, I'd get the person who made it but I don't quite remember, sorry!

I got it from that massive script thread:




```local showing = {}
local npressed = 0
function instructions_init_name(e,name)
weapon_name[e] = name
showing[e] = 0
--folder name containing the images
LoadImages("instructions",0)
end


function instructions_main(e)

if PlayerLooking(e,150,20) == 1 then
--text to display when near the entity
PromptLocal(e,"Note")
if GetInKey() == "e" and npressed == 0 then
npressed = 1
if showing[e] == 0 then
showing[e] = 1
SetImagePosition(50,50)
ShowImage(weapon_name[e])
else
showing[e] = 0
HideImage(weapon_name[e])
end
end
else
if showing[e] == 1 then
HideImage(weapon_name[e])
showing[e] = 0
end
end

if g_KeyPressE == 0 then
npressed = 0
end

end

function PlayerLooking(e,dis,v)
if g_Entity[e] ~= nil then
if dis == nil then
dis = 3000
end
if v == nil then
v = 0.5
end
if GetPlayerDistance(e) <= dis then
local destx = g_Entity[e]['x'] - g_PlayerPosX
local destz = g_Entity[e]['z'] - g_PlayerPosZ
local angle = math.atan2(destx,destz)
angle = angle * (180.0 / math.pi)

if angle <= 0 then
angle = 360 + angle
elseif angle > 360 then
angle = angle - 360
end
while g_PlayerAngY < 0 or g_PlayerAngY > 360 do
if g_PlayerAngY <= 0 then
g_PlayerAngY = 360 + g_PlayerAngY
elseif g_PlayerAngY > 360 then
g_PlayerAngY = g_PlayerAngY - 360
end
end
local L = angle - v
local R = angle + v
if L <= 0 then
L = 360 + L
elseif L > 360 then
L = L - 360
end
if R <= 0 then
R = 360 + R
elseif R > 360 then
R = R - 360
end

if (L < R and math.abs(g_PlayerAngY) > L and math.abs(g_PlayerAngY) < R) then
return 1
elseif (L > R and (math.abs(g_PlayerAngY) > L or math.abs(g_PlayerAngY) < R)) then
return 1
else
return 0
end
else
return 0
end
end
end```
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 30th Jun 2018 09:20
I have a note script that works in DX9, in the store here.

https://www.tgcstore.net/product/30695

I have had no reports of it NOT working in DX9 or DX11.

I hope that helps.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, Asus GT970 STRIX 4gb Nvidia gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit, Novation Ultranova Synth, Waldorf Blofeld Synth, Roland D05 Synth Module, Bluedio Victory V Headphones, AKG K141 Studio Headphones, Lenovo Ideapad, with Windows 10 64bit, 8Gb Ram and AMD A10 7th Gen Graphics.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 30th Jun 2018 12:03
The only note script that uses the utils library that I'm aware of is the one I posted on smalls's thread and I provided utillib.lua in that post so if that doesn't work on the dx9 build I'd be interested to know why.

Can you place the utillib.lua from that thread into scriptbank, try the notes script and let me know what errors you are getting please.

(You will need to edit the notes script to put the names of the 'note' files into it and name the entities you attach the script to to match)
Been there, done that, got all the T-Shirts!
PM
vincenthendriks
8
Years of Service
User Offline
Joined: 5th Nov 2016
Playing: A whole lot of different things.
Posted: 7th Jul 2018 10:16
That's the thing, it didn't give any errors, I actually see a 'note' text show up, but when I press e ntohing happens. I tried checking the script but I didn't see anything that could cause it not to work. I used a different script that does work for me though.

Sorry for replying so late, and thank you for helping me.

Login to post a reply

Server time is: 2024-12-22 19:35:13
Your offset time is: 2024-12-22 19:35:13