if(strcmp(cmd, "/sup", true) == 0 || strcmp(cmd, "/support", 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_RED, "BENUTZE: /support [FRAGE]");
return 1;
}
format(string, sizeof(string), "*°*->->> Eine Frage von %s ID: [%d]: %s *°*", sendername, playerid, (result));
SendAdminMessage(COLOR_YELLOW,string);
SendClientMessage(playerid,COLOR_YELLOW, "* Deine Mitteilung wurde an alle Admins gesendet !");
}
return 1;
}
und noch die Public/ forward :
forward SendAdminMessage(color,string[]);
public SendAdminMessage(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
SendClientMessage(i,color,string);
}
}
}
}