//Dcmd Befehle
dcmd_setadmin(playerid, params[])
{
new pID, level, string[100], playername[MAX_PLAYER_NAME];
if(sSpieler[playerid][Adminlevel] != 5) return SendClientMessage(playerid, 0xC8C8C8FF, "Dein Adminlevel reicht nicht aus, um diesen Befehl zu benutzen.");
if(sscanf(params, "ud", pID, level)) return SendClientMessage(playerid, 0xC8C8C8FF, "Tippe: /setadmin [Spielername / ID] [Adminlevel 0-5]");
if(strval(level) < 0 || strval(level) > 5) return SendClientMessage(playerid, 0xC8C8C8FF, "Das Adminlevel muss zwichen 0 [Uninvite] und 5 liegen.");//<------
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, sizeof(string), "* %s hat dir das Adminlevel %d zugewiesen.", playername, level);
SendClientMessage(pID, 0xC8C8C8FF, string);
GetPlayerName(pID, playername, MAX_PLAYER_NAME);
format(string, sizeof(string), "* Du hast %s das Adminlevel %d zugewiesen.", playername, level);
SendClientMessage(playerid, 0xC8C8C8FF, string);
sSpieler[pID][Adminlevel] = strval(level);//<---------
return 1;
}
Markiert mit <---