What is wrong , it is not working, thanks
-- LUA Script - precede every function and global member with lowercase name of script + '_main'
-- Switch with counter
local combiswitch = {}
function combiswitch_init(e)
CombiSwitch = 0
end
function combiswitch_main(e)
PlayerDist = GetPlayerDistance(e)
if CombiSwitch == 0 then
if PlayerDist < 200 and g_PlayerHealth > 0 then
Prompt("Press E key to activate combiswitch")
if g_KeyPressE == 1 then
CombiSwitch = 1
PromptDuration("CombiSwitch activated" ,3000)
CS=CS+1
if CS == 6 then Prompt("Game finished")
end
end
end
end
end
Laptop MSI Vector GP66 , I7 processor 12th Gen Intel(R) Core(TM) i7-12700H 2.70 GHz, Nvidia graphics RTX 3060, 16 Gb memory