Jump to content

Looping players with for loop


i514x

Recommended Posts

HI, I've been playing SA-MP for a while now but never knew MTA is just so freaking awesome. So now I play MTA SA and I started making my own server, Lua is a bit of pain coz of the syntax but i'm getting a hang of it. My question is how can I loop through all players in a for loop? What I want accomplish is make a getPlayerSource function by player's name.

@Edit: I have found getDeadPlayers and getAlivePlayers but no such function as getPlayers, if I join those tables would it be ok? Anyways is there any better way?

Link to comment
So now I play MTA SA and I started making my own server, Lua is a bit of pain coz of the syntax but i'm getting a hang of it.

Pawn looks like Java and c, and Lua looks like... action script.

Do you seriously mean that Pawn is easier than Lua? Pawn doesn't even look like a scripting language :o .

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...