Beiträge von hearteyy

    Er hat 26 Errors, d.h. eine } Klammer vergessen. Überprüf das, was du als letztes bearbeitet hast bzw. greif auf ein Backup zurück. Den Fehler kann man nicht lokalisieren.


    mfg
    surrender

    Versuchs mal so, ungetestet.



    new bool:vDriver[MAX_VEHICLES];
    new eingestiegen = 0;

    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    vDriver[GetPlayerVehicleID(playerid)] = true;
    eingestiegen = 1;
    }
    else if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
    {
    vDriver[GetPlayerVehicleID(playerid)] = false;
    eingestiegen = 0;
    }
    return 1;
    }


    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
    {
    if(!ispassenger)
    {
    if(vDriver[vehicleid] && eingestiegen == 1 )
    {
    TogglePlayerControllable(playerid, 1); // Vorgang abbrechen
    }
    }
    return 1;
    }

    Ist das nicht im GF schon vorhanden? der Befehl heißt glaube ich /agl. Naja hier isser nochmal:



    if(strcmp(cmd, "/agl", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (PlayerInfo[playerid][pAdmin] >= 2)
    {
    new x_nr[256];
    x_nr = strtok(cmdtext, idx);
    if(!strlen(x_nr)) {
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agl [name] [playerid/PartOfName]");
    SendClientMessage(playerid, COLOR_WHITE, "Available names: Driving, Flying, Sailing, Fishing, Weapon.");
    return 1;
    }
    if(strcmp(x_nr,"flying",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agl flyinglicense [playerid/PartOfName]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "* You've given a Flying License to %s.",giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Admin %s has given you a Flying License.",sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    PlayerInfo[giveplayerid][pFlyLic] = 1;
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is Offline!");
    return 1;
    }
    }
    else if(strcmp(x_nr,"sailing",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agl sailinglicense [playerid/PartOfName]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "* You've given a Sailing License to %s.",giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Admin %s has given you a Sailing License.",sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    PlayerInfo[giveplayerid][pBoatLic] = 1;
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is Offline!");
    return 1;
    }
    }
    else if(strcmp(x_nr,"driving",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agl Driverslicense [playerid/PartOfName]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "* You've given a Driving License to %s.",giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Admin %s has given you a Driving License.",sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    PlayerInfo[giveplayerid][pCarLic] = 1;
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
    return 1;
    }
    }
    else if(strcmp(x_nr,"fishing",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agl fishinglicense [playerid/PartOfName]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "* You've given a Fishing License to %s.",giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Admin %s has given you a Fishing License.",sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    PlayerInfo[giveplayerid][pFishLic] = 1;
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is Offline!");
    return 1;
    }
    }
    else if(strcmp(x_nr,"weapon",true) == 0)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agl weaponlicense [playerid/PartOfName]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "* You've given a Weapon License to %s.",giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Admin %s has given you a Weapon License.",sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    PlayerInfo[giveplayerid][pGunLic] = 1;
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is Offline!");
    return 1;
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You are not authorised to use this command!");
    return 1;
    }
    }
    return 1;
    }


    Wenn er nich geht, Fehler posten.

    Wenn du die Model ID meinst, die steht im Wiki:


    Ersetze das mit dem alten:


    if(strcmp(cmd, "/setskin", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!tmp[0])return SendClientMessage(playerid,COLOR_GREY,"Verwendung: /setskin [SpielerID] [SkinID]");
    new sendername[MAX_PLAYERS];
    new giveplayer;
    giveplayer = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    new SkinID;
    SkinID = strval(tmp);
    if(SkinID > 299 || SkinID < 1) { return SendClientMessage(playerid, COLOR_GREY, "Die SkinID darf nicht unter 1 und über 299 liegen!");}
    if (PlayerInfo[playerid][pAdmin] >= 5)
    {
    if(IsPlayerConnected(giveplayer))
    {
    if(giveplayer != INVALID_PLAYER_ID)
    {
    PlayerInfo[giveplayer][pModel] = SkinID;
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* Dein Skin wurde von Administrator %s geändert.", sendername);
    SendClientMessage(giveplayer, COLOR_PURPLE, string);
    GetPlayerName(giveplayer,sendername, sizeof(sendername));
    format(string, sizeof(string), "* Du hast %s SkinID %d gegeben.", giveplayer,SkinID);
    SendClientMessage(playerid, COLOR_PURPLE, string);
    SetPlayerSkin(giveplayer, PlayerInfo[giveplayer][pModel]);
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Dir fehlt das benötigte Adminlevel!");
    }
    }
    return true;
    }