Posts: 263
Threads: 11
Joined: Nov 2014
Hi guys, so I want to create a list using textdraws, I've already made the textdraws but I don't know how to start I want to do a list for how many vips are in the server and if a vip logs out he gets removed from the list but when he logs in he's in the list.
And I already searched ******, I didn't find anything that looks to how I want it.
Thanks for your time!
Posts: 62
Threads: 6
Joined: Sep 2013
Reputation:
0
This is what you looking for ?
CMD:viponlinemem(playerid, params[])
{
new szDialog[1024];
foreach(new i: Player)
{
if(PlayerInfo[i][pDonateRank] >= 1)
{
format(szDialog, sizeof(szDialog), "%s\n* %s (%d)", szDialog, GetPlayerNameEx(i), PlayerInfo[i][pDonateRank]);
}
}
ShowPlayerDialog(playerid, 1849, DIALOG_STYLE_LIST, "Online VIP Members", szDialog, "Skip", "");
return 1;
}
Posts: 263
Threads: 11
Joined: Nov 2014
Quote:
Originally Posted by TunisianoGamer
This is what you looking for ?
CMD:viponlinemem(playerid, params[])
{
new szDialog[1024];
foreach(new i: Player)
{
if(PlayerInfo[i][pDonateRank] >= 1)
{
format(szDialog, sizeof(szDialog), "%s\n* %s (%d)", szDialog, GetPlayerNameEx(i), PlayerInfo[i][pDonateRank]);
}
}
ShowPlayerDialog(playerid, 1849, DIALOG_STYLE_LIST, "Online VIP Members", szDialog, "Skip", "");
return 1;
}
|
If I write textdraws several times, you're still stupid enough to give me a dialog, you've plagarized it too, idiot.
Obviously that wasen't what I meant.
Please only reply if you're here to help me.
Posts: 263
Threads: 11
Joined: Nov 2014
Posts: 2,856
Threads: 6
Joined: Jun 2007
Reputation:
0
Well I can imagine right now how it should look, do you want just a list with the names under each other like
name1
name2
name3
...
But than is the question how long is the list, is it scrollable ? or what happens if more vips are online than space in the vip list
Posts: 263
Threads: 11
Joined: Nov 2014
Quote:
Originally Posted by Nero_3D
Well I can imagine right now how it should look, do you want just a list with the names under each other like
name1
name2
name3
...
But than is the question how long is the list, is it scrollable ? or what happens if more vips are online than space in the vip list
|
The list is 20 lines long, I've designed the textdraws to go under eachother by using ~n~, I tried putting twenty names too and it worked so no problem there, I just want to know how to put the names under eachother when vips login,
like First vip logs in to the server, it puts his name on the vip list textdraw, second logs in it puts him under the first vip third vip logs in it puts him under the second vip, and if the second vip logs out it simply removes him from the list and puts the third vip under the first vip so the list is organized again.
Quote:
Originally Posted by Schneider
No need to attack him like that, be glad he tried to help.
Ontopic: Just replace that ShowPlayerDialog from his code with TextDrawSetString.
|
How was he trying to help? he copied a command he found on some script and pasted it here and then he's stupid enough to post it as a dialog, I clearly stated not to reply if you can't help so once again, fuck off.
Quote:
Originally Posted by Raweresh
Create one textdraw where names will be showed. And my question is, is this textdraw display everytime or when player use command?
Код:
new String[256];
new PlayerName[MAX_PLAYER_NAME];
for(new A,B = GetMaxPlayers(); A < B; A++)
{
if(IsPlayerConnected(A) && IsPlayerVip(A)) format(String,sizeof(String),"%s%s\n",String,PlayerName);
}
TextDrawSetString(TextDrawId,String);
Something like that.
|
This would definitely not work.
Posts: 263
Threads: 11
Joined: Nov 2014