Beiträge von RedDragon

    Scheint wohl ein Klammerfehler zu sein. Schau nochmal genau nach ;) Falls du es alleine nicht lösen kannst, kannst du auch den Code hier reinkopieren, die die Fehler auslösen.

    Warum leicht, wenn's schwer geht? :D Hier, wie du es viel einfacher machst:


    new CDTimer, Timer;


    if (strcmp("/countdown", cmdtext, true, 10) == 0)
    {
    if(gAdmin[playerid] == 3 || gAdmin[playerid] == 4)
    {
    GameTextForAll("~b~Countdown-Start", 1000, 5);
    Timer = SetTimer("Count", 1000, 1);
    CDTimer = 6;


    }
    return 1;
    }


    ...


    forward Count();
    public Count()
    {
    CDTimer--;
    new string[256];
    if(CDTimer == 0)
    {
    KillTimer(Timer);
    GameTextForAll("~b~Start", 1000, 2);
    }
    else
    {
    format(string, sizeof(string), "~b~%d",CDTimer);
    GameTextForAll(string, 1000, 2);
    }


    }

    Wäre nett, wenn du mir ein Bild zeigen könntest, damit ich weiß wo genau dein Problem liegt. Von deiner Beschreibung her weiß ich jetzt nicht, was du mit "Bild in der Taskleiste" meinst.

    Es geht viel einfacher und besser.


    if(IsPlayerNPC(andererspieler) == 1) // wenn "andererspieler" ein Bot ist...
    {
    SendClientMessage(playerid,rot,"Du kannst keinen Bot kicken!"); // Kommt ein Fehler
    return 1; //Ab hier nicht mehr weiter nach unten gehen
    }
    kick(andererspieler); // ansonsten den Spieler kicken


    Außerdem prüfst du in deinem Script den Namen von "playerid" also der Person, der den Befehl eintippt.

    if(GetPlayerSkin(playerid) >= 280 && GetPlayerSkin(playerid) <= 287) // Hat der Spieler einen Polizeiskin...
    {
    CreatePlayer3DTextLabel(playerid, text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer, attachedvehicle, testLOS)
    // Erstellt einen 3D-Text nur für einen Spieler
    }


    Mehr Infos: klick

    #include <a_samp>


    #define FILTERSCRIPT


    new Dead[MAX_PLAYERS], Float:DX[MAX_PLAYERS], Float:DY[MAX_PLAYERS],Float:DZ[MAX_PLAYERS],Float:DA[MAX_PLAYERS],DTimer[MAX_PLAYERS];
    public OnPlayerConnect(playerid)
    {
    Dead[playerid] = 0;
    return 1;
    }


    public OnPlayerDeath(playerid,killerid,reason)
    {
    Dead[playerid] = 1;
    GetPlayerPos(playerid,DX[playerid],DY[playerid],DZ[playerid]);
    GetPlayerFacingAngle(playerid,DA[playerid]);
    DTimer[playerid] = SetTimerEx("DSpawn", 180*1000, 0, "i",playerid);
    return 1;
    }


    public OnPlayerDisconnect(playerid,reason)
    {
    Dead[playerid] = 0;
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    if(Dead[playerid] == 1)
    {
    SetTimerEx("DSpawned", 100, 0, "i",playerid);
    }
    return 1;
    }


    forward DSpawn(playerid);
    public DSpawn(playerid)
    {
    if(Dead[playerid] == 1)
    {
    Dead[playerid] = 0;
    TogglePlayerControllable(playerid,1);
    ClearAnimations(playerid);
    SpawnPlayer(playerid);
    SetPlayerHealth(playerid,100);
    SetCameraBehindPlayer(playerid);
    }
    }


    forward DSpawned(playerid);
    public DSpawned(playerid)
    {
    if(Dead[playerid] == 1)
    {
    SetPlayerPos(playerid,DX[playerid],DY[playerid],DZ[playerid]);
    SetPlayerHealth(playerid,1); // Soll so aussehen, als ob man 0 Leben hätte^^
    SetPlayerCameraPos(playerid,DX[playerid],DY[playerid],DZ[playerid]+3);
    ResetPlayerWeapons(playerid);
    SetPlayerCameraLookAt(playerid,DX[playerid],DY[playerid],DZ[playerid]);
    SetPlayerFacingAngle(playerid,DA[playerid]);
    TogglePlayerControllable(playerid,0);
    ApplyAnimation(playerid,"PARACHUTE","FALL_skyDive_DIE",4.1,0,1,1,1,1);
    }
    }
    strtok(const string[], &index)
    {
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
    index++;
    }


    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
    result[index - offset] = string[index];
    index++;
    }
    result[index - offset] = EOS;
    return result;
    }
    public OnPlayerCommandText(playerid, cmdtext[])
    {


    if (strcmp("/kill", cmdtext, true, 10) == 0) //Zum Testen
    {
    SetPlayerHealth(playerid,0);
    return 1;
    }


    new cmd[30];
    new idx;
    cmd = strtok(cmdtext, idx);


    if(strcmp(cmd, "/heilen", true) == 0)
    {
    new tmp[30];
    tmp = strtok(cmdtext, idx);
    new otherplayer = strval(tmp);
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(otherplayer,X,Y,Z);
    if(IsPlayerConnected(otherplayer) == 1 && Dead[otherplayer] == 1 && IsPlayerInRangeOfPoint(playerid, 2.0, X, Y, Z) && playerid != otherplayer && Dead[playerid] == 0)
    {
    Dead[otherplayer] = 0;
    TogglePlayerControllable(otherplayer,1);
    KillTimer(DTimer[otherplayer]);
    SetPlayerHealth(otherplayer,50);
    SetCameraBehindPlayer(otherplayer);
    ApplyAnimation(playerid,"ped","getup",2.5,0,1,1,0,1);
    new Heilername[MAX_PLAYER_NAME];
    new Opfername[MAX_PLAYER_NAME];
    new string[128];
    GetPlayerName(otherplayer, Opfername, sizeof(Opfername));
    format(string, sizeof(string), "Du hast %s (ID:%d) wiederbelebt.",Opfername,otherplayer);
    SendClientMessage(playerid,0xFFFF00AA, string);
    new stringz[128];
    GetPlayerName(playerid, Heilername, sizeof(Heilername));
    format(stringz, sizeof(stringz), "Du wurdest von %s (ID:%d) wiederbelebt.",Heilername,playerid);
    SendClientMessage(otherplayer,0xFFFF00AA, stringz);
    }
    return 1;
    }
    return 0;
    }
    public OnPlayerText(playerid, text[])
    {
    if(Dead[playerid] == 1)
    {
    SendClientMessage(playerid,0xFFFF00AA,"Tote können nicht reden.");
    return 0;
    }
    return 1;
    }


    Nun aber ^^

    #include <a_samp>


    #define FILTERSCRIPT


    new Dead[MAX_PLAYERS], Float:DX[MAX_PLAYERS], Float:DY[MAX_PLAYERS],Float:DZ[MAX_PLAYERS],Float:DA[MAX_PLAYERS],DTimer[MAX_PLAYERS];
    public OnPlayerConnect(playerid)
    {
    Dead[playerid] = 0;
    return 1;
    }


    public OnPlayerDeath(playerid,killerid,reason)
    {
    Dead[playerid] = 1;
    GetPlayerPos(playerid,DX[playerid],DY[playerid],DZ[playerid]);
    GetPlayerFacingAngle(playerid,DA[playerid]);
    DTimer[playerid] = SetTimerEx("DSpawn", 180*1000, 0, "i",playerid);
    return 1;
    }


    public OnPlayerDisconnect(playerid,reason)
    {
    Dead[playerid] = 0;
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    if(Dead[playerid] == 1)
    {
    SetTimerEx("DSpawned", 100, 0, "i",playerid);
    }
    return 1;
    }


    forward DSpawn(playerid);
    public DSpawn(playerid)
    {
    if(Dead[playerid] == 1)
    {
    Dead[playerid] = 0;
    TogglePlayerControllable(playerid,1);
    ClearAnimations(playerid);
    SpawnPlayer(playerid);
    SetPlayerHealth(playerid,100);
    SetCameraBehindPlayer(playerid);
    }
    }


    forward DSpawned(playerid);
    public DSpawned(playerid)
    {
    if(Dead[playerid] == 1)
    {
    SetPlayerPos(playerid,DX[playerid],DY[playerid],DZ[playerid]);
    SetPlayerHealth(playerid,1); // Soll so aussehen, als ob man 0 Leben hätte^^
    SetPlayerCameraPos(playerid,DX[playerid],DY[playerid],DZ[playerid]+3);
    ResetPlayerWeapons(playerid);
    SetPlayerCameraLookAt(playerid,DX[playerid],DY[playerid],DZ[playerid]);
    SetPlayerFacingAngle(playerid,DA[playerid]);
    TogglePlayerControllable(playerid,0);
    ApplyAnimation(playerid,"PARACHUTE","FALL_skyDive_DIE",4.1,0,1,1,1,1);
    }
    }
    strtok(const string[], &index)
    {
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
    index++;
    }


    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
    result[index - offset] = string[index];
    index++;
    }
    result[index - offset] = EOS;
    return result;
    }
    public OnPlayerCommandText(playerid, cmdtext[])
    {


    if (strcmp("/kill", cmdtext, true, 10) == 0) //Zum Testen
    {
    SetPlayerHealth(playerid,0);
    return 1;
    }


    new cmd[30];
    new idx;
    cmd = strtok(cmdtext, idx);


    if(strcmp(cmd, "/heilen", true) == 0)
    {
    new tmp[30];
    tmp = strtok(cmdtext, idx);
    new otherplayer = strval(tmp);
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(otherplayer,X,Y,Z);
    if(IsPlayerConnected(otherplayer) == 1 && Dead[otherplayer] == 1 && IsPlayerInRangeOfPoint(playerid, 2.0, X, Y, Z) && playerid != otherplayer && Dead[playerid] == 0)
    {
    Dead[otherplayer] = 0;
    TogglePlayerControllable(otherplayer,1);
    KillTimer(DTimer[otherplayer]);
    SetPlayerHealth(otherplayer,50);
    SetCameraBehindPlayer(otherplayer);
    ApplyAnimation(playerid,"ped","getup",2.5,0,1,1,0,1);
    new Heilername[MAX_PLAYER_NAME];
    new Opfername[MAX_PLAYER_NAME];
    new string[128];
    GetPlayerName(otherplayer, Opfername, sizeof(Opfername));
    format(string, sizeof(string), "Du hast %s (ID:%d) wiederbelebt.",Opfername,otherplayer);
    SendClientMessage(playerid,0xFFFF00AA, string);
    new stringz[128];
    GetPlayerName(playerid, Heilername, sizeof(Heilername));
    format(stringz, sizeof(stringz), "Du wurdest von %s (ID:%d) wiederbelebt.",Heilername,playerid);
    SendClientMessage(otherplayer,0xFFFF00AA, stringz);
    }
    return 1;
    }
    return 0;
    }
    public OnPlayerText(playerid, text[])
    {
    if(Dead[playerid] == 1)
    {
    SendClientMessage(playerid,0xFFFF00AA,"Tote können nicht reden.");
    return 0;
    }
    return 1;
    }