Created
June 3, 2016 11:57
-
-
Save CaptainPRICE/5d161db6a6e010e68360ff7e409bb07a to your computer and use it in GitHub Desktop.
A small helper function (E2) to get an array of all players names with an argument of max. length (player with name greater than Length, will have the name "cuted-down"). Very simple.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function array getPlayersNameSubstr(Length) | |
{ | |
local Result = array() | |
local Players = players() | |
for (Index = 1, Players:count()) | |
{ | |
local Player = Players[Index, entity] | |
Result:pushString(Player:name():sub(1, Length)) | |
} | |
return Result | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment