30.12.2017, 08:33
PHP код:
CMD:pks(playerid, params[])
{
new moneys1, string[128];
for (new i = 0; i < PLAYERS; i++)
{
if (IsPlayerConnected2(i))
{
if (pklvl[playerid] > 0)
{
moneys1++;
}
else if(pklvl[playerid] == 2)
{
if(pklvl[playerid] > 0)
{
moneys1++;
}
}
}
}
if (moneys1 != 0)
{
SendClientMessage(playerid, COLOR_GREEN, "===========| Online Peace Keepers |===========");
new p=6;
while (p > 0)
{
for (new i = 0; i < PLAYERS; i++)
{
if (pklvl[i] == p)
{
format(string, 128, "{FFFFFF}%s - %s{FFFFFF} ", RPN(i), pkLVL(p),p);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else if(pklvl[i] == p)
{
if(pklvl[playerid] == 1)
{
format(string, 128, "{FFFFFF}%s - %s{FFFFFF}", RPN(i), pkLVL(p),p);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
p--;
}
}
else SendClientMessage(playerid, COLOR_RED, "There are currently no Peace Keepers online.");
return 1;
}