AFK/BACK Kleiner Fehler

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
  • Hi
    Ne frage :D
    Was is daran falsch Ö
    if(strcmp(cmdtext,"/afk",true,4)==0) {
    if(!strlen(cmdtext[5])) return SendClientMessage(playerid,COLOR_RED,"/afk Reason");
    new name[MAX_PLAYER_NAME], s[100];
    GetPlayerName(playerid,name,sizeof(name));
    format(s,sizeof(s),"%s is afk, Reason: %s",name,cmdtext[5]);
    SendClientMessageToAll(COLOR_RED, str);
    TogglePlayerControllable(playerid,0);
    return 1;
    }
    if(strcmp(cmdtext,"/back",true,5)==0) {
    new name[MAX_PLAYER_NAME], s[100];
    GetPlayerName(playerid,name,sizeof(name));
    format(s,sizeof(s),"%s is back",name);
    SendClientMessageToAll(COLOR_RED, str);
    TogglePlayerControllable(playerid,1);
    return 1;
    }

  • diese errors

  • if(strcmp(cmdtext,"/afk",true,4)==0) {
    if(!strlen(cmdtext[5])) return SendClientMessage(playerid,COLOR_RED,"/afk Reason");
    new name2[MAX_PLAYER_NAME], s[100];
    GetPlayerName(playerid,name2,sizeof(name2));
    format(s,sizeof(s),"%s is afk, Reason: %s",name2,cmdtext[5]);
    SendClientMessageToAll(COLOR_RED, s);
    TogglePlayerControllable(playerid,0);
    return 1;
    }
    if(strcmp(cmdtext,"/back",true,5)==0) {
    new name2[MAX_PLAYER_NAME], s[100];
    GetPlayerName(playerid,name2,sizeof(name2));
    format(s,sizeof(s),"%s is back",name2);
    SendClientMessageToAll(COLOR_RED, s);
    TogglePlayerControllable(playerid,1);
    return 1;
    }

    ...