Spieler X hat den Chat gecleart

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Guten Abend Breadfishler,


    ich habe da mal eine frage ich habe mal versucht ohne tutorial einen Clearchat befehl zu machen der an sich ja denke ich mal nicht so ,,Schwer" ist ich habe nun dies eingetragen:
    if (strcmp("/clearchat", cmdtext,true, 10) == 0)
    {
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(HELLBLAU," ");
    SendClientMessageToAll(ROT,"Der Spieler %d hat den Chat gecleart");
    return 1;
    }


    Ich will das dort halt steht Der Spieler [Der den befehl ausübt] hat den Chat gecleart


    Vielen dank im Vorraus :)

  • Das kannst du mit format machen:
    if(strcmp("/clearchat", cmdtext, true) == 0)
    {
    for(new i = 0; i < 100; i++) SendClientMessageToAll(HELLBLAU," ");
    new string[128];
    GetPlayerName(playerid, string, MAX_PLAYER_NAME);
    format(string, sizeof(string), "Der Spieler %s (ID: %d) hat den Chat gecleart.", string, playerid);
    SendClientMessageToAll(ROT,string);
    return 1;
    }

  • Beitrag von FineTime ()

    Dieser Beitrag wurde vom Autor aus folgendem Grund gelöscht: Zu spät ().