SA-MP Forums Archive
[FilterScript] [FS] PlayerList - V2.1 OUT - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] [FS] PlayerList - V2.1 OUT (/showthread.php?tid=129732)

Pages: 1 2


[FS] PlayerList - V2.1 OUT - Rizard - 23.02.2010

Why:
_________________________________________________
Not so long ago, Quincy_Gatlin asked about how to create a playerlist (just like the tablist) in Scripting Discussion.

My answer was --> use the tablist ... and OnPlayerClickPlayer()... BUT he made a point with saying that you can't realy combine that playerlist with anything.

_________________________________________________

SO
here is another version - hip hip hooray :P

Features:
Atm you can type /playerlist wich will show the list and you can select any player wich will return in a ClientMessage saying wich player you just clicked upon.

Define at the beginning if NPC's are REMOVED OR NOT - STANDARD = ADDED

Check the commands for furder features

Ofcourse totaly editable! - BUT PLS DO BE HUMAN AND GIVE ME CREDITS!

Commands:

/playerlist -shows ofcourse a dialog with every player (duh)

V2
/score - en or disables the score in the list
/ping - en or disables the ping in the list
/id - en or disables the id's in the list


Screen:



--> V2



Known Issues:
String size has to be adjusted as the number of players increases - Give me tips on how to fix this



Last but not least! --> horay! first FS post.

AND Comments are Welcome! - Questions 2 ofcourse but I doubt there'll be many

NO MIRRORS TY!


Downloads:

V2.1


V2


V1



Pastebins:

V2.1 http://pastebin.com/iQQzvt2q

V2 http://pastebin.com/Hj275dmQ

V1 http://pastebin.com/SGBDsAQi


Re: [FS] PlayerList - kLx - 23.02.2010

Rly nice!


Re: [FS] PlayerList - Rizard - 23.02.2010

Quote:
Originally Posted by kLx
Rly nice!
Appreciated


Re: [FS] PlayerList - skaTim - 23.02.2010

Great Work man !


Re: [FS] PlayerList - Rizard - 23.02.2010

Quote:
Originally Posted by dubstep
Great Work man !
After 47 views and 2 good responses I thank you


Re: [FS] PlayerList - Sergei - 23.02.2010

New string doesn't need to be 500 cells big. You only need MAX_PLAYER_NAME + 2 ('\' and 'n').

Otherwise, not bad. Including player ID's and ping wouldn't be bad.


Re: [FS] PlayerList - Rizard - 23.02.2010

Quote:
Originally Posted by $ЂЯĢ
New string doesn't need to be 500 cells big. You only need MAX_PLAYER_NAME + 2 ('\' and 'n').

Otherwise, not bad. Including player ID's and ping wouldn't be bad.
Amazing, I hope I get more replies like this.

1. I learn from them (more efficient scripting although the 500 was just random xD)
2. great id's (let's see if I can manage to get those in )

Tyvm


Re: [FS] PlayerList - V2 OUT - Rizard - 23.02.2010

Version 2 is Out

Added: ID, PING, SCORE

Now Editable how you want it! disable any of these 3 mentioned above


Re: [FS] PlayerList - V2 OUT - Sergei - 23.02.2010

Quote:
Originally Posted by Rizard
Known Issues:
NPC's are added to the list - solution : start the loop with another value
Add IsPlayerNPC check?


Re: [FS] PlayerList - V2 OUT - Rizard - 23.02.2010

Quote:
Originally Posted by $ЂЯĢ
Quote:
Originally Posted by Rizard
Known Issues:
NPC's are added to the list - solution : start the loop with another value
Add IsPlayerNPC check?
I'll make it editable ass well then, for some, NPC's in the list are critical.

Thnx for another suggestion




Re: [FS] PlayerList - V2 OUT - RyDeR` - 23.02.2010

rofl at this sentence 'Please do be human' I dunno why ..

Nice release


Re: [FS] PlayerList - V2 OUT - Quincy_Gatlin - 23.02.2010

THANK YOU RIZARD! Just what I was asking for, thank you!


Re: [FS] PlayerList - V2 OUT - Rizard - 24.02.2010

Quote:
Originally Posted by » RyDeR «
rofl at this sentence 'Please do be human' I dunno why ..
lmao I was searching for the right words xD
Quote:
Originally Posted by » RyDeR «
Nice release
THNX

Quote:
Originally Posted by Quincy_Gatlin
THANK YOU RIZARD! Just what I was asking for, thank you!
NP mate I hope this helps even more people

I'll try another update this afternoon




Re: [FS] PlayerList - V2 OUT - Rizard - 24.02.2010

UPDATED TO VERSION 2.1

What's new?!:

Choose if you want npc's shown or not!

Adjustable stringsize! adjust it if not all players are shown in the list! (kinda a safety net for the bug)

Credits Go 2: $ЂЯĢ for the suggestion(s)

More comments are welcome!!



Re: [FS] PlayerList - V2 OUT - ghks245 - 24.02.2010

Nice Work


Re: [FS] PlayerList - V2 OUT - ThaYuriShit - 24.02.2010

Nice idea


Re: [FS] PlayerList - V2 OUT - Sergei - 24.02.2010

Line 433:
pawn Код:
new string[128]; ==> new string[48]; /*OR*/ string[MAX_PLAYER_NAME + 24];
Also you should calculate how big string you need in each case because using 500 everywhere is just waste of memory.


Re: [FS] PlayerList - V2 OUT - Rizard - 24.02.2010

Thnx for the nice reponses so far

Quote:
Originally Posted by $ЂЯĢ
Line 433:
pawn Код:
new string[128]; ==> new string[48]; /*OR*/ string[MAX_PLAYER_NAME + 24];
Also you should calculate how big string you need in each case because using 500 everywhere is just waste of memory.
You are realy making me work xD I like it , I keep on learning.

the calculation is what I tried, but It didn't work 'cause the stringsize wasn't constant or something, I'm gonna rebrainstorm this in a few days

question: one 'size' in a string (meaning: string[1]) ain't just one character right?
I'm not familiar with the whole string-array stuff

Grts


Re: [FS] PlayerList - V2 OUT - Sergei - 24.02.2010

One cell, one character. Only if you use packed strings you can put four characters in one cell.


Re: [FS] PlayerList - V2 OUT - Dongotti - 25.02.2010

Very nice work =)! Will come in handy for many people (Including me). Keep it up mate !

[SU]Dongotti