if g_KeyPressW == 1 and g_KeyPressSHIFT == 1 then ,,,,,,,, it works perfectly.
but the : SetGamePlayerControlTopspeed( value ) i do not get it to work properly.
Here is only the part of my script im using for the stamina.
--- handle stamina ---
Prompt(GetGamePlayerControlTopspeed())
if stamina > 0 then
if g_KeyPressW == 1 and g_KeyPressSHIFT == 1 then
counter_stamina = counter_stamina - 1
if counter_stamina <= 0 then
counter_stamina = 0
--- SetGamePlayerControlTopspeed() ( nothing i put in here works , player need to run at same speed as walk speed because he is tired. )
end
end
if g_KeyPressW ~= 1 and g_KeyPressSHIFT ~= 1 and counter_stamina < 100 then
counter_stamina = counter_stamina + 0.2
if counter_stamina == 100 then
--- SetGamePlayerControlTopspeed() ( nothing i put in here works. after player has rested and stamina is 100 then he must be able to run again.)
end
end
Panel(0,8,16,28)
TextColor(1,17,1,"Stamina = "..math.floor(counter_stamina),160, 64, 0)
end
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