boro Posted August 16, 2014 Share Posted August 16, 2014 Hi i have script for disable sprint and i try make outputchatbox forinfo stamina level but this show only chek vhat is bad ? stamina = 10 addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), function () stamina = 10 setTimer(checkKey,700,0) setTimer(updateStamina,1000,0) outputChatBox ( "Stamina start", getLocalPlayer(), 255, 255, 255, true ) end) function checkKey() if ( getControlState ( "sprint" ) ) and stamina ~= 0 then local check = stamina stamina = stamina -1 outputChatBox ( " ..check.. " % stamina ", getLocalPlayer(), 255, 255, 255, true ) end if ( stamina == 0 ) then setControlState( "sprint", false ) end end function updateStamina() if stamina ~= 10 and getControlState ( "sprint" ) == false then stamina = stamina +1 end end Link to comment
</Mr.Tn6eL> Posted August 16, 2014 Share Posted August 16, 2014 Hi i have script for disable sprint and i try make outputchatbox forinfo stamina level but this show only chek vhat is bad ? stamina = 10 addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), function () stamina = 10 setTimer(checkKey,700,0) setTimer(updateStamina,1000,0) outputChatBox ( "Stamina start", getLocalPlayer(), 255, 255, 255, true ) end) function checkKey() if ( getControlState ( "sprint" ) ) and stamina ~= 0 then local check = stamina stamina = stamina -1 outputChatBox ( " ..check.. " % stamina ", getLocalPlayer(), 255, 255, 255, true ) end if ( stamina == 0 ) then setControlState( "sprint", false ) end end function updateStamina() if stamina ~= 10 and getControlState ( "sprint" ) == false then stamina = stamina +1 end end stamina = 10 addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), function () stamina = 10 setTimer(checkKey,700,0) setTimer(updateStamina,1000,0) outputChatBox ( "Stamina start", getLocalPlayer(), 255, 255, 255, true ) end) function checkKey() if ( getControlState ( "sprint" ) ) and stamina ~= 0 then local check = stamina stamina = stamina -1 outputChatBox ( " " ..check.. " % stamina ", getLocalPlayer(), 255, 255, 255, true ) end if ( stamina == 0 ) then setControlState( "sprint", false ) end end function updateStamina() if stamina ~= 10 and getControlState ( "sprint" ) == false then stamina = stamina +1 end end Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now