29.10.2009, 14:11
how can i fix this
it only shows kicked out of admin team
it only shows kicked out of admin team
pawn Код:
if(strcmp(cmd, "/makeadmin", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /makeadmin [playerid] [level]");
return 1;
}
giveplayerid = strval(tmp);
tmp = strtok(cmdtext, idx);
if (IsPlayerAdmin(playerid))
{
if(PlayerInfo[giveplayerid][pAdmin] >= 101)
{
format(string, sizeof(string), "%s Has been made a Test-Admin by admin %s", PlayerName[giveplayerid], PlayerName[playerid]);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
else if(PlayerInfo[giveplayerid][pAdmin] >= 102)
{
format(string, sizeof(string), "%s Has been made a Moderator by admin %s", PlayerName[giveplayerid], PlayerName[playerid]);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
else if(PlayerInfo[giveplayerid][pAdmin] >= 103)
{
format(string, sizeof(string), "%s Has been made a Admin by admin %s", PlayerName[giveplayerid], PlayerName[playerid]);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
else if(PlayerInfo[giveplayerid][pAdmin] >= 104)
{
format(string, sizeof(string), "%s Has been made a Super-Admin by admin %s", PlayerName[giveplayerid], PlayerName[playerid]);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
else if(PlayerInfo[giveplayerid][pAdmin] >= 105)
{
format(string, sizeof(string), "%s Has been made a Super-Admin by admin %s", PlayerName[giveplayerid], PlayerName[playerid]);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
else if(PlayerInfo[giveplayerid][pAdmin] <= 1)
{
format(string, sizeof(string), "%s Has been kicked out of the admin team by admin %s", PlayerName[giveplayerid], PlayerName[playerid]);
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
else
{
format(string, sizeof(string), "blupblup");
SendClientMessageToAll(COLOR_RED, string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are a part of the admin team");
}
return 1;
}