11.09.2016, 15:03
hello, i need /setlevel command to be like this
Usage: /setlevel [playerid] [level]
and give the message to him with no sscanf2 i dont need it
i have /admins command if you want it for something
CMD:admins(playerid,params[])
{
new Count = 0;
new string[100], n[MAX_PLAYER_NAME];
SendClientMessage(playerid, 0x00FF00FF, "{5EFF00}__________|- Online Admins -|__________");
SendClientMessage(playerid, 0xFF0000FF, " ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][Level] > 0)
{
GetPlayerName(i,n,sizeof(n));
format(string,sizeof(string),"Level %d: %s (ID: %d) - %s", PlayerInfo[i][Level], n, i, GetRankFromLevel(i));
SendClientMessage(playerid, 0xFF0000FF, string);
Count++;
}
}
if(Count == 0)
{
SendClientMessage(playerid, 0xFF0000FF, "No admin online in the list");
}
SendClientMessage(playerid, 0x00FF00FF, "____________________________");
return 1;
}
stock GetRankFromLevel(playerid)
{
new Rank[40];
switch(PlayerInfo[playerid][Level])
{
case 0:
{
Rank = "Regular Player";
}
case 1:
{
Rank = "{FFA500}Trial Administrator";
}
case 2:
{
Rank = "{008000}Junior Moderator";
}
case 3:
{
Rank = "{FFFF00}Super Moderator";
}
case 4:
{
Rank = "{32CD32}Administrator";
}
case 5:
{
Rank = "{00A6FF}Master Administrator";
}
case 6:
{
Rank = "{00A6FF}Professional Administrator";
}
case 7:
{
Rank = "{FF0000}Delta Administrator";
}
case 8:
{
Rank = "{FF0000}Alfa Administrator";
}
case 9:
{
Rank = "{FF0000}Scripter";
}
case 10:
{
Rank = "{FF0000}Corporate";
}
}
return Rank;
}
pls do something
Usage: /setlevel [playerid] [level]
and give the message to him with no sscanf2 i dont need it
i have /admins command if you want it for something
CMD:admins(playerid,params[])
{
new Count = 0;
new string[100], n[MAX_PLAYER_NAME];
SendClientMessage(playerid, 0x00FF00FF, "{5EFF00}__________|- Online Admins -|__________");
SendClientMessage(playerid, 0xFF0000FF, " ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][Level] > 0)
{
GetPlayerName(i,n,sizeof(n));
format(string,sizeof(string),"Level %d: %s (ID: %d) - %s", PlayerInfo[i][Level], n, i, GetRankFromLevel(i));
SendClientMessage(playerid, 0xFF0000FF, string);
Count++;
}
}
if(Count == 0)
{
SendClientMessage(playerid, 0xFF0000FF, "No admin online in the list");
}
SendClientMessage(playerid, 0x00FF00FF, "____________________________");
return 1;
}
stock GetRankFromLevel(playerid)
{
new Rank[40];
switch(PlayerInfo[playerid][Level])
{
case 0:
{
Rank = "Regular Player";
}
case 1:
{
Rank = "{FFA500}Trial Administrator";
}
case 2:
{
Rank = "{008000}Junior Moderator";
}
case 3:
{
Rank = "{FFFF00}Super Moderator";
}
case 4:
{
Rank = "{32CD32}Administrator";
}
case 5:
{
Rank = "{00A6FF}Master Administrator";
}
case 6:
{
Rank = "{00A6FF}Professional Administrator";
}
case 7:
{
Rank = "{FF0000}Delta Administrator";
}
case 8:
{
Rank = "{FF0000}Alfa Administrator";
}
case 9:
{
Rank = "{FF0000}Scripter";
}
case 10:
{
Rank = "{FF0000}Corporate";
}
}
return Rank;
}
pls do something