Beiträge von pitbull901

In 10 Minuten startet der nächtliche Backupvorgang! Es kann währenddessen (ca. 10 Minuten) zu Einschränkungen bei der Nutzung des Forums kommen
Weitere Infos findet ihr im Thema Backup des Forums

    Ich hab das So gemacht aber es geht immer noch nicht .......



    if(strcmp(cmd, "/polizei", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new para1;
    para1 = ReturnUser(tmp);
    if(strcmp(tmp,"0",true) == 0)
    {
    gTeam[para1] = 3;
    PlayerInfo[para1][pPolizei] = 0;
    PlayerInfo[para1][pChar] = 0;
    new rand = random(sizeof(CIV));
    SetSpawnInfo(para1, gTeam[para1], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    PlayerInfo[para1][pModel] = CIV[rand];
    MedicBill[para1] = 0;
    SpawnPlayer(para1);
    SendClientMessage(playerid, COLOR_GRAD1, "Du bist nun kein Polizist");
    SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
    }
    else if(strcmp(tmp,"1",true) == 0)
    {
    PlayerInfo[para1][pChar] = 283;
    PlayerInfo[para1][pPolizei] = 1;
    }
    return 1;
    }
    }

    Wen ich das machen will macht der nur eine Zeile immer....



    if(strcmp(cmd, "/polizei", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /polizei 1 für Polizist oder 0 für nicht Polizist"); return 1; } new level; new para1; para1 = ReturnUser(tmp); level = strval(tmp); if(level > 1 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Geh nicht tiefer als Nummer 0, oder höher als Nummer 1!"); return 1; } if (PlayerInfo[playerid][pAdmin] >= 1337) { if(level == 0) { gTeam[para1] = 3; PlayerInfo[para1][pPolizei] = 0; PlayerInfo[para1][pChar] = 0; new rand = random(sizeof(CIV)); SetSpawnInfo(para1, gTeam[para1], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[para1][pModel] = CIV[rand]; MedicBill[para1] = 0; SpawnPlayer(para1); SendClientMessage(playerid, COLOR_GRAD1, "Du bist nun kein Polizist"); SetPlayerSkin(para1, PlayerInfo[para1][pChar]); } else if(level == 1) { PlayerInfo[para1][pChar] = 283; PlayerInfo[para1][pPolizei] = 1; } // LOS SANTOS POLICE SetPlayerSkin(para1, PlayerInfo[para1][pChar]); } else { SendClientMessage(playerid, COLOR_GRAD1, " ** INFO:!"); } } return 1; }

    Ich Brauche Hilfe ich hab einen Befehl eingebaut "/Polizei 1" der macht das man Polizist ist und mit "/Polizei 0" das man es nicht ist bloß wen man "/Polizei 0" macht bleibt man Polizist also in der Benutzer ini ist immer noch "Polizist = 1".




    Quelltext:



    if(strcmp(cmd, "/polizei", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /polizei 1 für Polizist oder 0 für nicht Polizist");
    return 1;
    }
    new level;
    new para1;
    para1 = ReturnUser(tmp);
    level = strval(tmp);
    if(level > 1 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Geh nicht tiefer als Nummer 0, oder höher als Nummer 1!"); return 1; }
    if (PlayerInfo[playerid][pAdmin] >= 1337)
    {
    if(level == 0)
    {
    gTeam[para1] = 3;
    PlayerInfo[para1][pPolizei] = 0;
    PlayerInfo[para1][pChar] = 0;
    new rand = random(sizeof(CIV));
    SetSpawnInfo(para1, gTeam[para1], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    PlayerInfo[para1][pModel] = CIV[rand];
    MedicBill[para1] = 0;
    SpawnPlayer(para1);
    SendClientMessage(playerid, COLOR_GRAD1, "Du bist nun kein Polizist");
    SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
    }
    else if(level == 1) { PlayerInfo[para1][pChar] = 283; PlayerInfo[para1][pPolizei] = 1; }
    SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " ** INFO:!");
    }
    }
    return 1;
    }