und zwar wollte ich so den /d chat für die cops reinmachen:
if(strcmp(cmdtext, "/departments", true) == 0 strcmp(cmdtext, "/d", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/d)epartments [department chat]");
return 1;
}
if(PlayerInfo[playerid][Leader] == 1 PlayerInfo[playerid][Team] == 1)
{
if(PlayerInfo[playerid][Rank] == 6) { format(string, sizeof(string), "** Chief %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][Rank] == 5) { format(string, sizeof(string), "** Captain %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][Rank] == 4) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][Rank] == 3) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][Rank] == 2) { format(string, sizeof(string), "** Officer %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][Rank] == 1) { format(string, sizeof(string), "** Cadet %s: %s, over. **", sendername, result); }
else
{
format(string, sizeof(string), "** Officer %s: %s, over. **", sendername, result);
}
SendClientMessage(LsCop, COLOR_ALLDEPT, string);
printf("%s", string);
}
}
return 1;
}
Wen ich dan /d eingebe dan steht da vonwegen ja gib text ein....
mache ich /d Hallo dan steht da.... es ist auf diesem server kein befehl
bitte helft mir