}
if(!strcmp(strget(cmdtext,0),"/makeadmin"))
{
if(IsPlayerConnected(playerid))
{
new tmp[128];
new idx;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, Orange, "Benutze: /makeadmin [ID] [Level]");
return 1;
}
new para1;
new level;
new cmd[128];
para1 = strval(tmp);
tmp = strtok(cmd, idx);
level = strval(tmp);
if(PlayerInfo[playerid][pAdmin] >= 5)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
new GivePlayer[128];
GetPlayerName(para1, GivePlayer, sizeof(GivePlayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pAdmin] = level;
printf("AdmCmd: %s has promoted %s to a level %d admin.", sendername, GivePlayer, level);
format(string, sizeof(string), " You have been promoted to a level %d admin by %s", level, sendername);
SendClientMessage(para1, Orange, string);
format(string, sizeof(string), " You have promoted %s to a level %d admin.", GivePlayer,level);
SendClientMessage(playerid, Orange, string);
}
}
}
else
{
SendClientMessage(playerid, Orange, "You are not Admin.");
}
}
return 1;
Kann mir einer helfen wie ich das mache damit ich /makeadmin benutzen kann wenn ich /makeadmin mache dann macht er ich automatisch auf 0 Admin