Huhu, ich mache gerade ein Adminchat jedoch wird die Naricht nicht an die Admins sondern an alle Spieler gesendet.
stock SendAdminMessage(Farbe, Message[])
{
for(new playerid; playerid < GetMaxPlayers(); playerid++)
{
if(GetPVarInt(playerid, "Adminlevel")>=0)
{
SendClientMessage(playerid, Farbe, Message);
}
}
return 1;
}
ocmd:a(playerid,params[])
{
new text[128],astring[128],ustring[128];
if(sscanf(params,"s",text))return SendClientMessage(playerid,Grau,"Benutze: /a [Text]");
if(GetPVarInt(playerid,"Adminlevel") == 0)
{
format(ustring,sizeof(ustring),"((User %s : %s ))",SpielerName(playerid),text);
SendAdminMessage(Gelb,ustring);
}
else if(GetPVarInt(playerid,"Adminlevel") == 1)
{
format(astring,sizeof(astring),"((Supporter %s : %s ))",SpielerName(playerid),text);
SendAdminMessage(Gelb,astring);
}
else if(GetPVarInt(playerid,"Adminlevel") == 2)
{
format(astring,sizeof(astring),"((Trial-Administrator %s : %s ))",SpielerName(playerid),text);
SendAdminMessage(Gelb,astring);
}
else if(GetPVarInt(playerid,"Adminlevel") == 3)
{
format(astring,sizeof(astring),"((Administrator %s : %s ))",SpielerName(playerid),text);
SendAdminMessage(Gelb,astring);
}
else if(GetPVarInt(playerid,"Adminlevel") == 4)
{
format(astring,sizeof(astring),"((Server Leitung %s : %s ))",SpielerName(playerid),text);
SendAdminMessage(Gelb,astring);
}
return 1;
}
Gruß