Hallo liebe Breadfisher habe ein Problem mit den Chat der Behörden undzwar wen ich als Cop mit /r [Text] schreibe dann kommt was
aber wen ich es bei Army oder FBI mit /r [Text] versuche kommt garnichts kann es sein da es doppelt ist das es nicht funktioniert?
hier der code:
if(strcmp(cmdtext,"/r",true,2) == 0)<-----------------------------------------------------------FUNKTNIERT!!!!
{
new string[128],name[24];
GetPlayerName(playerid,name,sizeof name);
format(string,sizeof string,"Chief %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Captain %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Lieutnant %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Seargent %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Officer %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Cadet %s: %s,over",name,cmdtext[3]);
if(!strlen(cmdtext[2]))
{
SendClientMessage(playerid,COLOR_GREY,"Benutze: /r [text]");
return 1;
}
if(gTeam[playerid] == TEAM_COPS|| gTeam[playerid] == TEAM_COPS)
{
for(new i=0 ; i <GetMaxPlayers() ; i++)
{
if(gTeam[i] == TEAM_COPS || gTeam[i] == TEAM_COPS)
{
SendClientMessage(i,COLOR_LSPDCHAT,string);
}
}
}
return 1;
}
//-------------------------------/FBI-CHAT/----------------------------------//
if(strcmp(cmdtext,"/r",true,2) == 0)<--------------------------------------------------------FUNKTIONIERT NICHT!
{
new string[128],name[24];
GetPlayerName(playerid,name,sizeof name);
format(string,sizeof string,"Director %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Assistan Director in Charge %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Special Agent in Charge %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Special Agent %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Special Agent Trainee %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Professional Staff %s: %s,over",name,cmdtext[3]);
if(!strlen(cmdtext[2]))
{
SendClientMessage(playerid,COLOR_GREY,"Benutze: /r [text]");
return 1;
}
if(gTeam[playerid] == TEAM_FBI|| gTeam[playerid] == TEAM_FBI)
{
for(new i=0 ; i <GetMaxPlayers() ; i++)
{
if(gTeam[i] == TEAM_FBI || gTeam[i] == TEAM_FBI)
{
SendClientMessage(i,COLOR_LSPDCHAT,string);
}
}
}
return 1;
}
//----------------------------------/ARMY-CHAT/-------------------------------//
if(strcmp(cmdtext,"/r",true,2) == 0)<--------------------------------------------------------------FUNKTIONIERT NICHT!
{
new string[128],name[24];
GetPlayerName(playerid,name,sizeof name);
format(string,sizeof string,"General %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Oberstleutnant %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Hauptmann %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Leutnant %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Stabsgefreiter %s: %s,over",name,cmdtext[3]);
format(string,sizeof string,"Gefreiter %s: %s,over",name,cmdtext[3]);
if(!strlen(cmdtext[2]))
{
SendClientMessage(playerid,COLOR_GREY,"Benutze: /r [text]");
return 1;
}
if(gTeam[playerid] == TEAM_ARMY|| gTeam[playerid] == TEAM_ARMY)
{
for(new i=0 ; i <GetMaxPlayers() ; i++)
{
if(gTeam[i] == TEAM_ARMY || gTeam[i] == TEAM_ARMY)
{
SendClientMessage(i,COLOR_LSPDCHAT,string);
}
}
}
return 1;
}