if(strcmp(cmd, "/mostwanted", true) == 0 || strcmp(cmd, "/mw", true) == 0) {
{
new count = 0;
if(gTeam[playerid] != TEAM_ARMY) return SendClientMessage(playerid,COLOR_RED,"You cannot use this command, You are not team army!");
}
else
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerWantedLevel(i) >= 8 && count <= 4)
{
count ++;
new namer[30];
new dialstring[256];
GetPlayerName(i,namer,30);
format(dialstring,sizeof(dialstring),"\nMost Wanted Player List: \n\n%s[%d]\n%s[%d]\n%s[%d]",namer,i,namer,i,namer,i);
ShowPlayerDialog(playerid,DIALOG_PLAYER_NOTICES,0,"Los Santos C 'n' R [BMUK] (0.3)",dialstring,"Ok","Cancel");
}
else if (GetPlayerWantedLevel(i) >= 0 && count <= 0)
{
SendClientMessage(playerid,COLOR_RED,"No most wanted players online!");
}
}
}
return 1;
}
if(strcmp(cmd, "/mostwanted", true) == 0 || strcmp(cmd, "/mw", true) == 0) { new count = 0; if(gTeam[playerid] != TEAM_ARMY){return SendClientMessage(playerid,COLOR_RED,"You cannot use this command, You are not team army!"); }else{ for(new i = 0; i < MAX_PLAYERS; i++) { if(GetPlayerWantedLevel(i) >= 8 && count <= 4) { count ++; new namer[30]; new dialstring[256]; GetPlayerName(i,namer,30); format(dialstring,sizeof(dialstring),"\nMost Wanted Player List: \n\n%s[%d]\n%s[%d]\n%s[%d]",namer,i,namer,i,namer,i); ShowPlayerDialog(playerid,DIALOG_PLAYER_NOTICES,0,"Los Santos C 'n' R [BMUK] (0.3)",dialstring,"Ok","Cancel"); } } if (count==0) { SendClientMessage(playerid,COLOR_RED,"No most wanted players online!"); } } return 1; }
if(strcmp(cmd, "/mostwanted", true) == 0 || strcmp(cmd, "/mw", true) == 0)
{
if(gTeam[playerid] != TEAM_ARMY) return SendClientMessage(playerid, COLOR_RED, "You cannot use this command, you are not team army!");
new wanted[10] = { INVALID_PLAYER_ID, ... }, level;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
level = GetPlayerWantedLevel(i);
if(level > 7)
{
for(new j = 0; j < sizeof(wanted); j++)
{
if(level > GetPlayerWantedLevel(wanted[j]))
{
if(j != sizeof(wanted)-1)
{
for(new l = sizeof(wanted)-1; l > j; l--)
{
wanted[l] = wanted[l-1];
}
}
wanted[j] = i;
break;
}
}
}
}
}
if(wanted[0] == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "No most wanted players online!");
new str[256], tmp[64], name[MAX_PLAYER_NAME];
for(new i = sizeof(wanted)-1; i != -1; i--)
{
if(wanted[i] != INVALID_PLAYER_ID)
{
GetPlayerName(wanted[i], name, MAX_PLAYER_NAME);
format(tmp, sizeof(tmp), "\n%s[%d] wanted level: %d", name, wanted[i], GetPlayerWantedLevel(wanted[i]));
strins(str, tmp, 0);
}
}
strins(str, "\nMost Wanted Player List: \n", 0);
ShowPlayerDialog(playerid, DIALOG_PLAYER_NOTICES, 0, "Los Santos C 'n' R [BMUK] (0.3)", str, "Ok", "Cancel");
return 1;
}
Originally Posted by Jefff
What I must change in this Mастерминд? i want to get score but isnt working if i have - ;x must be >= 0 and i want minus too
|