Problem mit AFK Script!

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
  • Hab nen Problem bei nem Script, unzwar wenn ich im Spiel /afk mache kommt nix genau das gleiche Problem wie bei Drag aber Drag geht jetz, jetz ist dieses Problem hier aufgetreten...


    #include <a_samp>
    #define COLOR_LIGHTBLUE 0x33CCFFAA
    #if defined FILTERSCRIPT
    #endif


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/back", cmdtext, true, 10) == 0)
    {
    new name[24], string[64];
    GetPlayerName(playerid, name, 24);
    format(string, sizeof(string), "~w~%s ~r~ist züruck", name);
    GameTextForAll(string, 4000, 3);
    new player[256];
    new string1[256];
    GetPlayerName(playerid, player, sizeof(player));
    format(string1, sizeof(string1), "%s - ist züruck!", player,playerid);
    SendClientMessageToAll(0x33CCFFAA, string1);
    new name2[24], string2[64];
    GetPlayerName(playerid, name2, 24);
    format(string2, sizeof(string2), "COMMAND:%s Type /back", name2);
    printf(string2);
    TogglePlayerControllable(playerid,true);
    return 1;
    }
    if (strcmp("/afk", cmdtext, true, 10) == 0)
    {
    new player[256];
    new string1[256];
    GetPlayerName(playerid, player, sizeof(player));
    format(string1, sizeof(string1), "%s - ist AFK!", player,playerid);
    SendClientMessageToAll(0x33CCFFAA, string1);
    new name[24], string[64];
    GetPlayerName(playerid, name, 24);
    format(string, sizeof(string), "~w~%s ~r~ist AFK!", name);
    GameTextForAll(string, 4000, 3);
    new name2[24], string2[64];
    GetPlayerName(playerid, name2, 24);
    format(string2, sizeof(string2), "COMMAND:%s Type /afk", name2);
    printf(string2);
    TogglePlayerControllable(playerid,false);
    return 1;
    }
    return 1;
    }


    Ich bitte um schnelle Hilfe, danke.

    Einmal editiert, zuletzt von Goldkiller ()


  • #include <a_samp>
    #define COLOR_LIGHTBLUE 0x33CCFFAA
    #if defined FILTERSCRIPT
    #endif


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/back", cmdtext, true, 10) == 0)
    {
    new name[24], string[64];
    GetPlayerName(playerid, name, 24);
    format(string, sizeof(string), "~w~%s ~r~ist züruck", name);
    GameTextForAll(string, 4000, 3);
    new player[256];
    new string1[256];
    GetPlayerName(playerid, player, sizeof(player));
    format(string1, sizeof(string1), "%s - ist züruck!", player,playerid);
    SendClientMessageToAll(0x33CCFFAA, string1);
    new name2[24], string2[64];
    GetPlayerName(playerid, name2, 24);
    format(string2, sizeof(string2), "COMMAND:%s Type /back", name2);
    printf(string2);
    TogglePlayerControllable(playerid,true);
    return 1;
    }
    if (strcmp("/afk", cmdtext, true, 10) == 0)
    {
    new player[256];
    new string1[256];
    GetPlayerName(playerid, player, sizeof(player));
    format(string1, sizeof(string1), "%s - ist AFK!", player,playerid);
    SendClientMessageToAll(0x33CCFFAA, string1);
    new name[24], string[64];
    GetPlayerName(playerid, name, 24);
    format(string, sizeof(string), "~w~%s ~r~ist AFK!", name);
    GameTextForAll(string, 4000, 3);
    new name2[24], string2[64];
    GetPlayerName(playerid, name2, 24);
    format(string2, sizeof(string2), "COMMAND:%s Type /afk", name2);
    printf(string2);
    TogglePlayerControllable(playerid,false);
    return 1;
    }
    return 0;
    }
    jetz gehts
    return0; tsatt 1 :thumbsup:

  • public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/back", cmdtext, true) == 0)
    {
    new name[24], string[64];
    GetPlayerName(playerid, name, 24);
    format(string, sizeof(string), "~w~%s ~r~ist züruck", name);
    GameTextForAll(string, 4000, 3);
    new player[256];
    new string1[256];
    GetPlayerName(playerid, player, sizeof(player));
    format(string1, sizeof(string1), "%s - ist züruck!", player,playerid);
    SendClientMessageToAll(0x33CCFFAA, string1);
    new name2[24], string2[64];
    GetPlayerName(playerid, name2, 24);
    format(string2, sizeof(string2), "COMMAND:%s Type /back", name2);
    printf(string2);
    TogglePlayerControllable(playerid,true);
    return 1;
    }
    if (strcmp("/afk", cmdtext, true) == 0)
    {
    new player[256];
    new string1[256];
    GetPlayerName(playerid, player, sizeof(player));
    format(string1, sizeof(string1), "%s - ist AFK!", player,playerid);
    SendClientMessageToAll(0x33CCFFAA, string1);
    new name[24], string[64];
    GetPlayerName(playerid, name, 24);
    format(string, sizeof(string), "~w~%s ~r~ist AFK!", name);
    GameTextForAll(string, 4000, 3);
    new name2[24], string2[64];
    GetPlayerName(playerid, name2, 24);
    format(string2, sizeof(string2), "COMMAND:%s Type /afk", name2);
    printf(string2);
    TogglePlayerControllable(playerid,false);
    return 1;
    }
    return 0;
    }


    Keine Garantie auf das Funktionieren des Scripts.