ok so i got it to work.
@DVader , and AmenMoses , and Jerry Tremble , and synchromesh, and smallg ,and Belidos , and roandoom. thank you.
DVader , i could not use your module_combatcore script , we kept on getting errors.
when i looked at your module_combatcore script then i saw that it contained a lot more lines than the one i have. ( mine has +- 610 lines and yours have 1002 lines. )
So i used my module_combatcore and put g_hidden = 0 in the same place as in your script then it worked.
With the help of Roandoom i have modified the hideplayer.lua so that it can work with GetInKey() in put ,
Also did the code to reset the hidden flag.
function hideplayer_init(e)
KeyPressedN = 1
g_hidden=0
end
function hideplayer_main(e)
if GetInKey() ~= "n" or GetInKey() ~= "N" then
KeyPressedN = 0
end
if (GetInKey() == "n" or GetInKey() == "N") and KeyPressedN == 0 then
if g_hidden == 0 then
g_hidden = 1
else
g_hidden = 0
end
KeyPressedN = 1
end
end
Thanks again for every one's help and in put.
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11