dcmd_makeadmin(playerid,params[])
{
if(Player[playerid][admin] == 4 || IsPlayerAdmin(playerid)) {}
new pID,alevel;
if(sscanf(params,"ud",pID,alevel)){
return SendClientMessage (playerid,COLOR_RED,"USAGE: /makeadmin [playerid] [adminlevel]");
}
if(!IsPlayerConnected(pID)){
return SendClientMessage (playerid,COLOR_RED,"Niemand ist online mit dieser ID!");
}
new string[128],string2[128],aname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME];
Player[pID][admin] = alevel;
GetPlayerName(playerid,aname,sizeof(aname));
GetPlayerName(pID,name,sizeof(name));
format(string,sizeof(string),"Du hast das Admin Level von %s auf %d gesetzt!",name,alevel);
format(string2,sizeof(string2),"Server Besitzer %s hat dein Admin Level auf %d gesetzt!",aname,alevel);
SendClientMessage(playerid,COLOR_GREEN,string);
SendClientMessage(pID,COLOR_GREEN,string2);
return 1;
}
JEDER kann Leute zum Admin machen
Wie fixxe ich das?
//Edit: Fixxed!