Hab was Editiert aber da....

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
  • Da ist etwas schiefgelaufen :/ alle diese befehle gehen nicht:


    //----------------------------------[setskin]------------------------------------------------
    if(strcmp(cmd, "/setskin", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Hilfe : /setskin [playerid/PartOfName] [skin model]");
    return 1;
    }
    new playa;
    new health;
    playa = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    health = strvalEx(tmp);
    if (PlayerInfo[playerid][pAdmin] >= 4)
    {
    if(IsPlayerConnected(playa))
    {
    if(playa != INVALID_PLAYER_ID)
    {
    new name[20];
    new victim[20];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(playa, victim, sizeof(victim));
    PlayerInfo[playa][pModel] = health;
    PlayerInfo[playa][pChar] = health;
    SetPlayerSkin(playa, PlayerInfo[playa][pChar]);
    format(string, 256, "AdmWarning: [%s] Skin was just set to %d by %s!",victim,health,name);
    ABroadCast(COLOR_YELLOW,string,1347);
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du darfst diesen CMD nicht nutzen,schäm dich!");
    }
    }
    return 1;
    }
    //----------------------------------[sethp]------------------------------------------------
    if(strcmp(cmd, "/sethp", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "NUTZUNG: /sethp [playerid] [Leben]");
    return 1;
    }
    new playa;
    new health;
    playa = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    health = strval(tmp);
    if(PlayerInfo[playa][pAdmin] > PlayerInfo[playerid][pAdmin])
    {
    SendClientMessage(playerid, COLOR_GRAD1, "FEHLER");
    return 1;
    }
    if (PlayerInfo[playerid][pAdmin] >= 4)
    {
    if(IsPlayerConnected(playa))
    {
    if(playa != INVALID_PLAYER_ID)
    {
    SetPlayerHealth(playa, health);
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du bist nicht befugt.!");
    }
    if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Du kannst diesen Spieler nicht heilen, da er ein höheres Adminlevel hat als du!");
    return 1;
    }


    }
    return 1;
    }
    if(strcmp(cmd, "/setarmor", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /setarmor [playerid] [armor]");
    return 1;
    }
    new playa;
    new health;
    playa = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    health = strval(tmp);
    if (PlayerInfo[playerid][pAdmin] >= 4)
    {
    if(IsPlayerConnected(playa))
    {
    if(playa != INVALID_PLAYER_ID)
    {
    SetPlayerArmour(playa, health);
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du bist nicht befugt!");
    }
    }
    return 1;
    }
    /* if(strcmp(cmd, "/veh", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (PlayerInfo[playerid][pAdmin] < 2002)
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du bist nicht befugt!");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /veh [carid] [color1] [color2]");
    return 1;
    }
    new car;
    car = strval(tmp);
    if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " Auto Nummer nicht weniger als 400 oder höher als 611 sein !"); return 1; }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_BLUE, "Benutze: /veh [carid] [color1] [color2]");
    return 1;
    }
    new color1;
    color1 = strval(tmp);
    if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Nicht Weniger als 0 oder höher 126 !"); return 1; }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /veh [carid] [color1] [color2]");
    return 1;
    }
    new color2;
    color2 = strval(tmp);
    if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Nicht weniger als 0 oder höher als 126 !"); return 1; }
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid, X,Y,Z);
    new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
    CreatedCars[CreatedCar] = carid;
    CreatedCar++;
    Gas[carid] = GetGasMax(car);
    format(string, sizeof(string), " Auto %d gespawned.", carid);
    SendClientMessage(playerid, COLOR_GREY, string);
    }
    return 1;
    }*/
    if(strcmp(cmd, "/veh", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (PlayerInfo[playerid][pAdmin] < 2002)
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Du bist kein Admin!");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /veh [carid] [color1] [color2]");
    return 1;
    }
    new car;
    car = strval(tmp);
    if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, "Auto Nummer nicht weniger als 400 oder höher als 611 sein !"); return 1; }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /veh [carid] [color1] [color2]");
    return 1;
    }
    new color1;
    color1 = strval(tmp);
    if(color1 < 0 || color1 > 252) { SendClientMessage(playerid, COLOR_GREY, "Nicht Weniger als 0 oder höher 252 !"); return 1; }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /veh [carid] [color1] [color2]");
    return 1;
    }
    new color2;
    color2 = strval(tmp);
    if(color2 < 0 || color2 > 252) { SendClientMessage(playerid, COLOR_GREY, "Nicht weniger als 0 oder höher als 252!"); return 1; }
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid, X,Y,Z);
    new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, -1);
    SetVehicleNumberPlate(carid, "{009900}R{FF0000}G{0000FF}R {0000FF}Event");
    CreatedCars[CreatedCar] = carid;
    CreatedCar++;
    PutPlayerInVehicle(playerid,carid,0);
    // Gas[carid] = GetGasMax(car);
    format(string, sizeof(string), "Auto mit der ID %d hergestellt.", carid);
    SendClientMessage(playerid, COLOR_GREY, string);
    }
    return 1;
    }
    if(strcmp(cmd, "/deletethiscar", true) == 0 || strcmp(cmd, "/dtc", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] < 1338 )
    {
    SendClientMessage(playerid, COLOR_GRAD1, "** INFO ** Das ist ein Adminbefehl, du bist kein Admin!");
    return 1;
    }
    if(IsPlayerInAnyVehicle(playerid))
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    DestroyVehicle(GetPlayerVehicleID(playerid));
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_GREY, "Du hast dieses Fahrzeug erfolgreich gelöscht.");
    }
    }
    return 1;
    }
    if(strcmp(cmd, "/fixveh", true) == 0)
    {
    if (IsPlayerConnected(playerid) && PlayerInfo[playerid][pAdmin] >= 1337)
    {
    new health;
    tmp = strtok(cmdtext, idx);
    health = strval(tmp);
    if(!strlen(tmp))
    {
    health = 1000;
    }
    SetVehicleHealth(GetPlayerVehicleID(playerid), health);
    UpdateVehicleDamageStatus(GetPlayerVehicleID(playerid), 0, 0, 0, 0);
    // GetPlayerName(playerid, sendername, sizeof(sendername));
    // format(string, 256, "Warnung: %s hat sein Auto %d repariert.", sendername,health);
    // ABroadCast(COLOR_YELLOW,string,1);
    }
    /*if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] < 1337)
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Geh in Paintspray du abuser!!!");
    return 1;
    }
    if(IsPlayerInAnyVehicle(playerid))
    {
    RepairVehicle(GetPlayerVehicleID(playerid));
    SendClientMessage(playerid, COLOR_GREY, "Vehicle repariert");
    GetPlayerName(playerid, sendername, sizeof(sendername));
    // format(string, sizeof(string), "%s hat sein Vehicle repariert.", sendername, giveplayer);
    ABroadCast(0x00F5FFFF,string,1337);
    }
    }*/
    return 1;
    }

    Einmal editiert, zuletzt von SyndraX ()