Counting how many files are in a directory?
#1

How would I go about counting how many files are in a directory? (As a way to do "Registered Players: 100, ect..")
AKA: I want to count the amount of files in "scriptfiles/rpg/userfiles/", and then the amount of files in there are the amount of registered players.
Reply
#2

Use ladmin 4 version 2.0 for SA-MP. It can help you and it saves everything also it got an admin system in it. This is recommended for starters like you. Soon you will create an own
Reply
#3

Quote:
Originally Posted by killer98p
View Post
Use ladmin 4 version 2.0 for SA-MP. It can help you and it saves everything also it got an admin system in it. This is recommended for starters like you. Soon you will create an own
I'm actually not a starter.

Just using this account instead of my other. I've already written my administrator system up, and it's working perfectly. I only need this question answered, and i'm 100 percent.
Reply
#4

Hmm isn't it against the rules to have multipe accounts?
Reply
#5

No, there's no function to count all the files inside a directory.
Well, there is but then you have to make a system your own, and count ++ everytime you create a file, and save that also in a main file.
Reply
#6

Quote:
Originally Posted by killer98p
View Post
Hmm isn't it against the rules to have multipe accounts?
As far as I know, no. Not to mention, 2,129,239,283,239 people would have broken that rule.

I'm taking it nobody even knows the answer to my question...
Reply
#7

In register command dini_intset("Registered Players.ini",dini_int+1 ?
Reply
#8

Quote:
Originally Posted by Sky4D
View Post
As far as I know, no. Not to mention, 2,129,239,283,239 people would have broken that rule.

I'm taking it nobody even knows the answer to my question...
You're not allowed to have multiple accounts, especially not when you're banned, that means ban evade and that will result in a permanent ban with 0% chance of an unban.

That means this account will also be banned soon.
Reply
#9

Quote:
Originally Posted by WackoX
View Post
You're not allowed to have multiple accounts, especially not when you're banned, that means ban evade and that will result in a permanent ban with 0% chance of an unban.

That means this account will also be banned soon.
I haven't been banned.. My other account is in good standing, along with this one.
Reply
#10

Quote:
Originally Posted by Sky4D
View Post
I haven't been banned.. My other account is in good standing, along with this one.
See? This is account is not banned, and this si my other account. I just don't want this name anymore, and Sky4D is already taken (by me...), so I couldn't get my username changed to that.

Also, it's not against the rules to have multiple accounts.

Quote:
Originally Posted by Forum Rules
* SEARCH before you ask anything, most of the questions have been asked before.
* No warez (and no-cd cracks, including any of the san andreas game files or leaked content), illegal materials or pornography.
* No racism or any other forms of discrimination.
* Don't advertise. A link to a site related to the topic is fine, spamming your home page is not. This includes advertising your servers and services. However, you are allowed to put advertisements in your signature or server advertisements.
* No SPAM. If you are adding no useful information to a topic, you are spamming.
* No double posting. There is a modify button , please use it.
* English only (except language specific sections)
* Do not insult, curse at, tease, or make offensive comments towards other members.
* Selling scripts or linking to sites that allow people to sell scripts are not allowed.
* Don't post huge scripts. Use http://pawn.pastebin.com/ instead.
* Scripts or other programmed things released on those forums MUST include all source.
* When responding to coding questions make sure your code works first.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)