Hey Leute, würden die 3 Befehle gehen, kann es nicht testen
ocmd:a(playerid,parama[])
{
new text[128];
if(!IstSpielerEinAdmin(playerid,1))return SendClientMessage(playerid,Grau,"Zugriff verweigert. Benötigter Rang: {00FF28}Supporter");
if(sscanf(parama,"s",text))return SendClientMessage(playerid,Grau,"Benutze: /a [Text]");
format(text,sizeof(text),"[Admin Chat]%s: %s",SpielerName(playerid),text);
SendAdminMessage(Gelb,text);
return 1;
}
ocmd:gov(playerid,params[])
{
if(IstSpielerInFraktion(playerid,1)) //Polizei Rang 6
{
if(GetPVarInt(playerid,"Rang") == 6)
{
new Text[128],string[128];
if(sscanf(params,"s",Text))return SendClientMessage(playerid,Grau,"Benutze: /gov [Text]");
format(string,sizeof(string),"Polizeidirektor %s: %s",SpielerName(playerid),Text);
SendClientMessageToAll(Blau,string);
}
}
if(IstSpielerInFraktion(playerid,1)) //Polizei Rang 5
{
if(GetPVarInt(playerid,"Rang") == 5)
{
new Text[128],string[128];
if(sscanf(params,"s",Text))return SendClientMessage(playerid,Grau,"Benutze: /gov [Text]");
format(string,sizeof(string),"Stellv. Polizeidirektor %s: %s",SpielerName(playerid),Text);
SendClientMessageToAll(Blau,string);
}
}
if(IstSpielerInFraktion(playerid,2)) //Bundeswehr Rang 5
{
if(GetPVarInt(playerid,"Rang") == 5)
{
new Text[128],string[128];
if(sscanf(params,"s",Text))return SendClientMessage(playerid,Grau,"Benutze: /gov [Text]");
format(string,sizeof(string),"Stellv. General %s: %s",SpielerName(playerid),Text);
SendClientMessageToAll(Blau,string);
}
}
if(IstSpielerInFraktion(playerid,2)) //Bundeswehr Rang 6
{
if(GetPVarInt(playerid,"Rang") == 6)
{
new Text[128],string[128];
if(sscanf(params,"s",Text))return SendClientMessage(playerid,Grau,"Benutze: /gov [Text]");
format(string,sizeof(string),"General %s: %s",SpielerName(playerid),Text);
SendClientMessageToAll(Blau,string);
}
}
if(IstSpielerInFraktion(playerid,3)) //FBI Rang 6
{
if(GetPVarInt(playerid,"Rang") == 6)
{
new Text[128],string[128];
if(sscanf(params,"s",Text))return SendClientMessage(playerid,Grau,"Benutze: /gov [Text]");
format(string,sizeof(string),"FBI Direktor %s: %s",SpielerName(playerid),Text);
SendClientMessageToAll(Blau,string);
}
}
if(IstSpielerInFraktion(playerid,3)) //FBI Rang 5
{
if(GetPVarInt(playerid,"Rang") == 5)
{
new Text[128],string[128];
if(sscanf(params,"s",Text))return SendClientMessage(playerid,Grau,"Benutze: /gov [Text]");
format(string,sizeof(string),"Stellv. FBI Direktor %s: %s",SpielerName(playerid),Text);
SendClientMessageToAll(Blau,string);
}
}
if(IstSpielerInFraktion(playerid,4)) //Notarzt Rang 5
{
if(GetPVarInt(playerid,"Rang") == 5)
{
new Text[128],string[128];
if(sscanf(params,"s",Text))return SendClientMessage(playerid,Grau,"Benutze: /gov [Text]");
format(string,sizeof(string),"Stellv. Notarztleiter %s: %s",SpielerName(playerid),Text);
SendClientMessageToAll(Blau,string);
}
}
if(IstSpielerInFraktion(playerid,4)) //Notarzt Rang 6
{
if(GetPVarInt(playerid,"Rang") == 6)
{
new Text[128],string[128];
if(sscanf(params,"s",Text))return SendClientMessage(playerid,Grau,"Benutze: /gov [Text]");
format(string,sizeof(string),"Notarztleiter %s: %s",SpielerName(playerid),Text);
SendClientMessageToAll(Blau,string);
}
}
if(IstSpielerInFraktion(playerid,5)) //ADAC Rang 6
{
if(GetPVarInt(playerid,"Rang") == 6)
{
new Text[128],string[128];
if(sscanf(params,"s",Text))return SendClientMessage(playerid,Grau,"Benutze: /gov [Text]");
format(string,sizeof(string),"ADAC Leiter %s: %s",SpielerName(playerid),Text);
SendClientMessageToAll(Blau,string);
}
}
if(IstSpielerInFraktion(playerid,5)) //ADAC Rang 5
{
if(GetPVarInt(playerid,"Rang") == 5)
{
new Text[128],string[128];
if(sscanf(params,"s",Text))return SendClientMessage(playerid,Grau,"Benutze: /gov [Text]");
format(string,sizeof(string),"Stellv. ADAC Leiter %s: %s",SpielerName(playerid),Text);
SendClientMessageToAll(Blau,string);
}
}
if(IstSpielerInFraktion(playerid,6)) //First News Rang 5
{
if(GetPVarInt(playerid,"Rang") == 5)
{
new Text[128],string[128];
if(sscanf(params,"s",Text))return SendClientMessage(playerid,Grau,"Benutze: /gov [Text]");
format(string,sizeof(string),"Stellv. First News Leiter %s: %s",SpielerName(playerid),Text);
SendClientMessageToAll(Blau,string);
}
}
if(IstSpielerInFraktion(playerid,6)) //First News Rang 5
{
if(GetPVarInt(playerid,"Rang") == 6)
{
new Text[128],string[128];
if(sscanf(params,"s",Text))return SendClientMessage(playerid,Grau,"Benutze: /gov [Text]");
format(string,sizeof(string),"First News Leiter %s: %s",SpielerName(playerid),Text);
SendClientMessageToAll(Blau,string);
}
}
return 1;
}
ocmd:f(playerid,params[])
{
new Text[128],string[128];
if(IstSpielerInFraktion(playerid,1))
{
if(sscanf(params,"s",Text))return SendClientMessage(playerid,Grau,"Benutze: /f [Text]");
new rang[64];
switch(GetPVarInt(playerid,"Rang"))
{
case 1:{rang="Praktikant";}
case 2:{rang="Hauptwachmann";}
case 3:{rang="Wachmann";}
case 4:{rang="Ausbilder";}
case 5:{rang="Stellv. Polizeidirektor";}
case 6:{rang="Polizeidirektor";}
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPVarInt(i,"Fraktion") == 1)
{
format(string,sizeof(string),"%s %s: %s",rang,SpielerName(playerid),Text);
SendClientMessage(i,Hellblau,string);
}
}
}
return 1;
}