Kenix Posted May 17, 2011 Posted May 17, 2011 how disable infinite run? Please help guys. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Castillo Posted May 17, 2011 Posted May 17, 2011 Do you mean like Stamina? if so, i don't think there's a way to disable that, maybe make an script? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Kenix Posted May 17, 2011 Author Posted May 17, 2011 Do you mean like Stamina? if so, i don't think there's a way to disable that, maybe make an script? yes i mean Stamina. addEventHandler("onPlayerJoin", root, function( ) setPedStat(source,22,999) -- and 0 , 999 still a player runs indefinitely. end ) I'm not sure this code please help who knows. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
MX_Master Posted May 17, 2011 Posted May 17, 2011 setPedStat(source,22,0) can't help i think (: may be 'onPlayerSpawn'? topcnc.ru # vydrenko.ru
Kenix Posted May 17, 2011 Author Posted May 17, 2011 setPedStat(source,22,0) can't help i think (: may be 'onPlayerSpawn'? still infinite run http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
karlis Posted May 17, 2011 Posted May 17, 2011 i guess you could just disable sprint button for few secs after it is held for longer then X ammount of seconds. [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
Try Posted May 17, 2011 Posted May 17, 2011 Try this: function stats() setPedStat(source,22,999) setTimer(stats,2000,1) end addEventHandler("onPlayerJoin",getRootElement(),stats) Omg Im crazy i started help all
Castillo Posted May 18, 2011 Posted May 18, 2011 I don't think MTA has this included, i think the Stamina won't affect anything, i would use Karlis idea. stamina = 100 addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), function () stamina = 100 setTimer(checkKey,700,0) setTimer(updateStamina,1000,0) end) function checkKey() if ( getControlState ( "sprint" ) ) and stamina ~= 0 then stamina = stamina -1 end if ( stamina == 0 ) then setControlState( "sprint", false ) end end function updateStamina() if stamina ~= 100 and getControlState ( "sprint" ) == false then stamina = stamina +1 end end Works (tested). San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
karlis Posted May 18, 2011 Posted May 18, 2011 I don't think MTA has this included, i think the Stamina won't affect anything, i would use Karlis idea. stamina = 100 addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), function () stamina = 100 setTimer(checkKey,700,0) setTimer(updateStamina,1000,0) end) function checkKey() if ( getControlState ( "sprint" ) ) and stamina ~= 0 then stamina = stamina -1 end if ( stamina == 0 ) then setControlState( "sprint", false ) end end function updateStamina() if stamina ~= 100 and getControlState ( "sprint" ) == false then stamina = stamina +1 end end Works (tested). yep, thats exactly what i was going to write today(had to go yesterday)...i guess no more need EDIT:i don't see a way that the button is enabled again? [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
Castillo Posted May 18, 2011 Posted May 18, 2011 Somehow it auto enables, lol. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
karlis Posted May 18, 2011 Posted May 18, 2011 guess bug with getControlState() [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
Kenix Posted May 18, 2011 Author Posted May 18, 2011 oh ok thx guys http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Castillo Posted May 18, 2011 Posted May 18, 2011 No problem. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
karlis Posted May 18, 2011 Posted May 18, 2011 your welcome [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
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