10.08.2009, 03:29
My /adminize command, when i just do /adminize it says USAGE:.... but when I fill it it (ex: /adminize 1 5) it says Unknown Command! Help please.
pawn Код:
if(!strcmp(cmdtext[1],"adminize",true))
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "[!] USAGE: /adminize [playerid] [admin level]");
return 1;
}
new para1;
new level;
if(IsStringAName(tmp))
{
para1 = GetPlayerID(tmp);
}
else
{
para1 = strval(tmp);
}
level = strval(tmp);
new playa = strval(tmp);
if(pAdmin[playerid] >= 5)
{
if(logged[playerid] == 1)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
pAdmin[para1] = level;
format(string, sizeof(string), "[!] Admin %s has promoted you to a level %s admin!",sendername, result); //LINE 360 !!
SendClientMessage(playa, COLOR_GREEN, string);
format(string, sizeof(string), "[!] You have promoted %s to a level %s admin!",giveplayer, result);
SendClientMessage(playerid, COLOR_GREEN, string);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "[!] You cannot use this command!");
}
return 1;
}