SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 02/09/2019, 12:14 AM   #1
NoPegassas0
Little Clucker
 
Join Date: Jul 2018
Posts: 21
Reputation: 7
Default Percentage

How do I print something like this?

Number / Remaining Number

1000/250

%25

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

1000/500

%50
NoPegassas0 is offline   Reply With Quote
Old 02/09/2019, 12:49 AM   #2
CheezIt
Big Clucker
 
CheezIt's Avatar
 
Join Date: Apr 2017
Posts: 178
Reputation: 17
Default Re: Percentage

%25
pawn Code:
printf("%d", (250 * 100) / 1000);

%50
pawn Code:
printf("%d", (500 * 100) / 1000);
__________________
I'd like to bring back my old CNR server that was created from scratch & hosted years ago. I'll host & update everything (including the website & forum). You would pay for hosted tab and help manage the community. PM me if you're interested!
CheezIt is offline   Reply With Quote
Old 02/09/2019, 12:55 AM   #3
NoPegassas0
Little Clucker
 
Join Date: Jul 2018
Posts: 21
Reputation: 7
Default Re: Percentage

Quote:
Originally Posted by CheezIt View Post
%25
pawn Code:
printf("%d", (250 * 100) / 1000);

%50
pawn Code:
printf("%d", (500 * 100) / 1000);
Thank you so much
NoPegassas0 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Percentage? Sanady Scripting Help 5 10/11/2015 10:03 AM
percentage SukMathcuck Scripting Help 3 30/08/2015 03:49 PM
Help With Getting Percentage AroseKhanNiazi Scripting Help 9 23/05/2014 03:27 PM
percentage gagnier91 Scripting Help 4 11/12/2011 12:58 AM
Percentage in my GM Sujer Help Archive 3 19/03/2011 11:05 AM


All times are GMT. The time now is 10:35 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.