iiv03 Posted November 22, 2019 Share Posted November 22, 2019 (edited) السلام عليكم كيف اخلي getTickCount يجيب لي ارقام ثواني ؟ مشكله تجيني الثواني 6131426.80785 محاولتي local TiempoPr = 0 addEvent("onPlayerSpray", true) addEventHandler("onPlayerSpray", root, function(rockets) if ( getTickCount ( ) - TiempoPr > 5000 ) then TiempoPr = getTickCount ( ) outputChatBox("Player #FFFFFF"..getPlayerName(source).." #FFFFFFhas shot #aacccc["..rockets.." #ffffffrockets in #ffffff"..TiempoPr.." #ffffffseconds]", root, 255, 255, 255, true) end end ) Edited November 22, 2019 by xFabel Link to comment
Rockyz Posted November 22, 2019 Share Posted November 22, 2019 (edited) جرب كذا local TiempoPr = getTickCount() addEvent("onPlayerSpray", true) addEventHandler("onPlayerSpray", root, function(rockets) local tick = getTickCount() if (tick - TiempoPr > 5000) then outputChatBox("Player #FFFFFF"..getPlayerName(source).." #FFFFFFhas shot #aacccc["..rockets.." #ffffffrockets in #ffffff"..math.floor((tick - TiempoPr) / 1000).." #ffffffseconds]", root, 255, 255, 255, true) TiempoPr = tick end end) Edited November 22, 2019 by xiRocKyz 1 Link to comment
فاّرس Posted November 23, 2019 Share Posted November 23, 2019 local TiempoPr = getTickCount() addEvent("onPlayerSpray", true) addEventHandler("onPlayerSpray", root, function(rockets) local current = math.floor ( ( getTickCount() - TiempoPr ) / 1000 ) if ( current > 5 ) then outputChatBox("Player #FFFFFF"..getPlayerName(source).." #FFFFFFhas shot #aacccc["..rockets.." #ffffffrockets in #ffffff"..current.." #ffffffseconds]", root, 255, 255, 255, true) end end ) 1 Link to comment
iiv03 Posted November 23, 2019 Author Share Posted November 23, 2019 مشكورين ماقصرتو 1 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