Two questions
#11

Quote:
Originally Posted by TheToretto
Посмотреть сообщение
That's more like a whose script is better contest
Obviously this one:

Quote:
Originally Posted by MEGADETHS
Посмотреть сообщение
There is probably a faster and easier way but this works.

This will show 20 playernames with wanted level lowest playerID ontop.

PHP код:

#define DIALOG_WANTEDPLAYERS 1
public OnPlayerCommandText(playeridcmdtext[])
{
if(!
strcmp(cmdtext"/wantedplayers"true))
{
new 
TotalWantedPlayers 0;
new 
PlayerCheck 0;
new 
StringSlot 1;
new 
NameSlot1[64];
new 
NameSlot2[64];
new 
NameSlot3[64];
new 
NameSlot4[64];
new 
NameSlot5[64];
new 
NameSlot6[64];
new 
NameSlot7[64];
new 
NameSlot8[64];
new 
NameSlot9[64];
new 
NameSlot10[64];
new 
NameSlot11[64];
new 
NameSlot12[64];
new 
NameSlot13[64];
new 
NameSlot14[64];
new 
NameSlot15[64];
new 
NameSlot16[64];
new 
NameSlot17[64];
new 
NameSlot18[64];
new 
NameSlot19[64];
new 
NameSlot20[64];
while(
PlayerCheck<MAX_PLAYERS && StringSlot 21)
{
if(
GetPlayerWantedLevel(PlayerCheck) > 0)
{
if(
StringSlot == 1)
{
GetPlayerName(playeridNameSlot1MAX_PLAYER_NAME+1);
}
if(
StringSlot == 2)
{
GetPlayerName(playeridNameSlot2MAX_PLAYER_NAME+1);
}
if(
StringSlot == 3)
{
GetPlayerName(playeridNameSlot3MAX_PLAYER_NAME+1);
}
if(
StringSlot == 4)
{
GetPlayerName(playeridNameSlot4MAX_PLAYER_NAME+1);
}
if(
StringSlot == 5)
{
GetPlayerName(playeridNameSlot5MAX_PLAYER_NAME+1);
}
if(
StringSlot == 6)
{
GetPlayerName(playeridNameSlot6MAX_PLAYER_NAME+1);
}
if(
StringSlot == 7)
{
GetPlayerName(playeridNameSlot7MAX_PLAYER_NAME+1);
}
if(
StringSlot == 8)
{
GetPlayerName(playeridNameSlot8MAX_PLAYER_NAME+1);
}
if(
StringSlot == 9)
{
GetPlayerName(playeridNameSlot9MAX_PLAYER_NAME+1);
}
if(
StringSlot == 10)
{
GetPlayerName(playeridNameSlot10MAX_PLAYER_NAME+1);
}
if(
StringSlot == 11)
{
GetPlayerName(playeridNameSlot11MAX_PLAYER_NAME+1);
}
if(
StringSlot == 12)
{
GetPlayerName(playeridNameSlot12MAX_PLAYER_NAME+1);
}
if(
StringSlot == 13)
{
GetPlayerName(playeridNameSlot13MAX_PLAYER_NAME+1);
}
if(
StringSlot == 14)
{
GetPlayerName(playeridNameSlot14MAX_PLAYER_NAME+1);
}
if(
StringSlot == 15)
{
GetPlayerName(playeridNameSlot15MAX_PLAYER_NAME+1);
}
if(
StringSlot == 16)
{
GetPlayerName(playeridNameSlot16MAX_PLAYER_NAME+1);
}
if(
StringSlot == 17)
{
GetPlayerName(playeridNameSlot17MAX_PLAYER_NAME+1);
}
if(
StringSlot == 18)
{
GetPlayerName(playeridNameSlot18MAX_PLAYER_NAME+1);
}
if(
StringSlot == 19)
{
GetPlayerName(playeridNameSlot19MAX_PLAYER_NAME+1);
}
if(
StringSlot == 20)
{
GetPlayerName(playeridNameSlot20MAX_PLAYER_NAME+1);
}
StringSlot StringSlot+1;
TotalWantedPlayers TotalWantedPlayers+1;
}
PlayerCheck PlayerCheck+1;
}
new 
string[256];
format(string,sizeof(string),"Total wanted players: %d"TotalWantedPlayers);
SendClientMessage(playerid,-1,string);
new 
TwentyNamesString[1280];
format(TwentyNamesString,sizeof TwentyNamesString,"%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",NameSlot1,NameSlot2,NameSlot3,NameSlot4,NameSlot5,NameSlot6,NameSlot7,NameSlot8,NameSlot9,NameSlot10,NameSlot11,NameSlot12,NameSlot13,NameSlot14,NameSlot15,NameSlot16,NameSlot17,NameSlot18,NameSlot19,NameSlot20);
ShowPlayerDialog(playeridDIALOG_WANTEDPLAYERSDIALOG_STYLE_MSGBOX"Wanted Players"TwentyNamesString"Close""");
return 
1;
}
return 
0;

Reply


Messages In This Thread
Two questions - by Proxus - 07.02.2019, 18:04
Re: Two questions - by Lunoxx - 07.02.2019, 18:15
Re: Two questions - by Hazon - 07.02.2019, 18:17
Re: Two questions - by Proxus - 07.02.2019, 18:32
Re: Two questions - by MEGADETHS - 07.02.2019, 19:02
Re: Two questions - by Bolex_ - 07.02.2019, 19:08
Re: Two questions - by Dayrion - 07.02.2019, 19:15
Re: Two questions - by Hazon - 07.02.2019, 19:19
Re: Two questions - by TheToretto - 07.02.2019, 19:21
Re: Two questions - by TheToretto - 07.02.2019, 19:29
Re: Two questions - by Kasichok - 07.02.2019, 19:34
Re: Two questions - by MEGADETHS - 07.02.2019, 19:43
Re: Two questions - by Proxus - 07.02.2019, 20:19
Re: Two questions - by AhmedMohamed - 07.02.2019, 21:39
Re: Two questions - by TheToretto - 07.02.2019, 21:43
Re: Two questions - by SymonClash - 07.02.2019, 23:56
Re: Two questions - by Kasichok - 08.02.2019, 00:38
Re: Two questions - by Proxus - 08.02.2019, 06:46
Re: Two questions - by TheToretto - 08.02.2019, 08:23
Re: Two questions - by Proxus - 08.02.2019, 14:49
Re: Two questions - by Kasichok - 09.02.2019, 09:59
Re: Two questions - by Y_Less - 09.02.2019, 11:10
Re: Two questions - by MEGADETHS - 09.02.2019, 12:25
Re: Two questions - by Y_Less - 09.02.2019, 14:17
Re: Two questions - by Proxus - 09.02.2019, 18:16
Re: Two questions - by TokicMajstor - 09.02.2019, 18:29
Re: Two questions - by ComDuck - 09.02.2019, 18:33
Re: Two questions - by Proxus - 09.02.2019, 19:03
Re: Two questions - by Proxus - 09.02.2019, 19:21
Re: Two questions - by Kasichok - 10.02.2019, 11:14
Re: Two questions - by J0sh... - 11.02.2019, 05:55
Re: Two questions - by Proxus - 11.02.2019, 16:06

Forum Jump:


Users browsing this thread: 1 Guest(s)