iMr.WiFi..! Posted August 23, 2017 Posted August 23, 2017 hello , i have question about "%" on coding .. I use it sometimes but i didn't understand Its usefulness .. anyone can explain me what is its usefulness ? 1 Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة ليس عليك اسعاد الجميع , ولكن عليك بإن لا تؤذي أحداً =========You do not have to make everyone happy, But you should not hurt anyone Want to contact with me? Discord: JustCarry#2616 (Always there)Skype: Live:JustCarry10 (Not always)
MTA Team Lpsd Posted August 23, 2017 MTA Team Posted August 23, 2017 % is modulo. It gives you the remainder from a division 2 % 1 = 0 3 % 2 = 1 50 % 23 = 4 and so on
iMr.WiFi..! Posted August 23, 2017 Author Posted August 23, 2017 25 minutes ago, LopSided_ said: % is modulo. It gives you the remainder from a division 2 % 1 = 0 3 % 2 = 1 50 % 23 = 4 and so on i understand it before your comment, however thanks for helping .. Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة ليس عليك اسعاد الجميع , ولكن عليك بإن لا تؤذي أحداً =========You do not have to make everyone happy, But you should not hurt anyone Want to contact with me? Discord: JustCarry#2616 (Always there)Skype: Live:JustCarry10 (Not always)
Moderators IIYAMA Posted August 24, 2017 Moderators Posted August 24, 2017 It is very useful for repeating (dx) animations. local duration = 4000 -- ms local progress = getTickCount() % duration / duration -- progress 0 t/m 1 3 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
iMr.WiFi..! Posted August 25, 2017 Author Posted August 25, 2017 10 hours ago, IIYAMA said: It is very useful for repeating (dx) animations. local duration = 4000 -- ms local progress = getTickCount() % duration / duration -- progress 0 t/m 1 Good example, wow ! Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة ليس عليك اسعاد الجميع , ولكن عليك بإن لا تؤذي أحداً =========You do not have to make everyone happy, But you should not hurt anyone Want to contact with me? Discord: JustCarry#2616 (Always there)Skype: Live:JustCarry10 (Not always)
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