Beiträge von Deadmau5

    Das kann nicht funktionieren, weil, wenn du auf Abbrechen klickst, kommt "Du bist kein Admin!", Wenn du auf Auswählen klickst, aber trotzdem kein Admin bist, geht es trotzdem, so meint Maddin das glaube ich ^^


    //EDIT: Richtig sollte es so sein:
    if(listitem == 0 && IsPlayerAdmin(playerid))
    {
    SetPlayerPos(playerid,1541.4043,-1670.2073,13.5525);
    SetPlayerHealth(playerid, 100);
    }
    else
    {
    SendClientMessage(playerid,0xAFAFAFAA,"AdmCmd: Du bist kein Admin.");
    }

    Mal ne Frage, an ALLE:


    Könnt ihr euch vielleicht mal angewöhnen, ein /closed hinzuschreiben?


    Sonst wird das hier ja noch total zugespammt!



    In meinen Augen: /closed

    Ist mal eine Idee ^^



    new frak = GetPVarInt(playerid,"Fraktion");
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
    if(frak != Muellabfuhrfraktion)
    {
    SendClientMessage(playerid,ROT,"Du bist kein Teil der Müllabfuhr!");
    RemovePlayerFromVehicle(playerid);
    }
    }

    Musst bei OnGameModeExit



    dini_Set("Türpasswort.ini","Passwort",tuerpasswort);




    machen und bei OnGameModeInit



    format(tuerpasswort,sizeof(tuerpasswort),"%s",dini_Get("Türpasswort.ini","Passwort"));



    versuchen.
    Wenn das oben genannte nicht geht, teste ich das selber mal...

    Sacht mal, seit ihr alle so blind?
    Da ist doch noch ein %d davor! :D
    public VehStateCheck()
    {
    for(new i=0;i<max_players;i++)
    {
    if(IsPlayerConnected(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER && !IsANoTachoVehicle(GetPlayerVehicleID(i)))
    {
    if(M_Bot[i][PAFK] == 0)
    {
    new Float:health,vehicleid = GetPlayerVehicleID(i),string[256],Float:value,Float:distance,Float:x,Float:y,Float:z;
    GetPlayerPos(i, x, y, z);
    distance = floatsqroot(floatpower(floatabs(floatsub(x,PCarPos[i][PCarX])),2)+floatpower(floatabs(floatsub(y,PCarPos[i][PCarY])),2)+floatpower(floatabs(floatsub(z,PCarPos[i][PCarZ])),2));
    value = floatround(distance * 11000);
    GetVehicleHealth(vehicleid,health);
    if (health >= 900 && health <= 1000)
    {
    format(string, sizeof(string), ~n~~n~~n~~n~~n~~n~~n~~n~~w~~n~~w~%d ~b~/~w~ %d~r~ Benzin~n~~r~%s",Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,3);
    }
    else if (health >= 600 && health < 900)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~~n~~w~%d ~b~/~w~ %d~r~ Benzin~n~~r~%s",Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,3);
    }
    else if (health >= 380 && health < 600)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~~n~~w~%d ~b~/~w~ %d~r~ Benzin~n~~r~%s",Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,3);
    }
    else if (health >= 0 && health < 380)
    {
    format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~~n~~w~%d ~b~/~w~ %d~r~ Benzin~n~~r~%s",Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)),VehicleName[GetVehicleModel(vehicleid)-400]);
    GameTextForPlayer(i,string,850,3);
    }
    PCarPos[i][PCarX] = x;
    PCarPos[i][PCarY] = y;
    PCarPos[i][PCarZ] = z;
    }
    }
    }
    return 1;
    }


    if(strcmp(cmd,"/türpw",true)==0)
    {
    if(PlayerInfo[playerid][pLeader] == 1)
    {
    tmp = strtok(cmdtext,idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid,0xFF0000FF,"Benutze: /türpw [Neues Passwort]");
    return 1;
    }
    if(strcmp(tmp,tuerpasswort,true)==0)
    {
    SendClientMessage(playerid,0xFF0000FF,"Das ist dasselbe Passwort! Nutze ein anderes!");
    return 1;
    }
    format(tuerpasswort,sizeof(tuerpasswort),"%s",tmp);
    format(string,sizeof(string),"Das neue Passwort ist: %s",tmp);
    SendClientMessage(playerid,0xFF0000FF,string);
    return 1;
    }
    }


    Achja bei public OnGameModeExit()
    musst du noch das hinzufügen:



    dini_Set("Türpasswort.ini","Passwort",tuerpasswort);

    new tuerpasswort[128];


    public OnGameModeInit()
    {
    tuerpasswort = dini_Get("Türpasswort.ini","Passwort");
    return 1;
    }


    else if (IsPlayerInRangeOfPoint(i,2.0,1520.6512,-1625.4971,13.5469))
    {
    ShowPlayerDialog(i,DIALOG_Password,DIALOG_STYLE_INPUT,"Password","Gib das Password ein!","Ok","Abbrechen");
    }


    if(dialogid == DIALOG_Password)
    {
    if(strcmp(inputtext,tuerpasswort,true)==0)
    {
    SendClientMessage(playerid,COLOR_RED,"Tür öffnet sich");
    }
    else
    {
    SendClientMessage(playerid,COLOR_RED,"Tür bleibt leider zu falsches password");
    }
    }

    Schau dir das mal genau an:


    MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed);
    MoveObject(bruecke,185.09661865234, -1937.4753417969, 16.423196792603, 0, 0, 99.99755859375);
    Man kann beim Bewegen die Rotation nicht verändern.
    Benutze dies:
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~Admin Base~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if (strcmp(cmdtext, "/brueckehoch", true) == 0){
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1){
    MoveObject(bruecke,185.09661865234, -1937.4753417969, 16.423196792603, 3);
    return 1;
    }}
    if (strcmp(cmdtext, "/brueckerunter", true) == 0){
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1){
    MoveObject(bruecke,185.095703125, -1937.474609375, 16.423196792603, 3);
    return 1;
    }}



    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Adminbase Befehl Ende~~~~~~~~~~~~~~~~~~~~~~

    //Edit: Nein, falsch.


    Du benutzt diese Callbacks im Script, hast jedoch keine dazugehörigen public's.


    d.H., füg im Script die ganzen "public ..." ein.


    Dann sollten die Errors behoben sein ^^


    Wenn du nicht weißt, was ich meine, schreib mir mal deine TV Daten via PN.


    Grüße Deadmau5 :D

    Jetzt machst du oben wo deine "new"'s sind, einfach ein new Invitefrak[MAX_PLAYERS] = 0;.


    Weiter, dein /invite machst du zu dem:

    if(strcmp(cmd, "/invite", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /invite [playerid/PartOfName]");
    return 1;
    }
    new para1;
    new ftext[25];
    para1 = ReturnUser(tmp);
    if (PlayerInfo[playerid][pLeader] >= 1)
    {
    if(IsPlayerConnected(para1))
    {
    if(para1 != INVALID_PLAYER_ID)
    {
    if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
    {
    if(PlayerInfo[para1][pJob] > 0)
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler hat einen Job !");
    return 1;
    }
    if(RequestJobMoney[para1]==1)
    {
    SendClientMessage(para1, COLOR_GREY, "Du hast nun einen Job, und dein Arbeitslosengeld ist gekündigt.");
    RequestJobMoney[para1]=0;
    }
    if(PlayerInfo[para1][pJobLock] >= 1)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du kannst ihn nicht inviten, der Spieler hat Jobsperre !");
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police Force"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI/ATF"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "National Guard"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Medic"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
    else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 120); }
    else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "21st Street"; ChosenSkin[para1] = 115; SetPlayerSkin(para1, 115); }
    else if(PlayerInfo[playerid][pLeader] == 7) { return 1; }
    else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "CNN Studio"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
    else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Unternehmen"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
    else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Fahrschule"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
    else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Groove Street Family"; ChosenSkin[para1] = 107; SetPlayerSkin(para1, 107); }
    else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 122; SetPlayerSkin(para1, 122); }
    else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "ADAC"; ChosenSkin[para1] = 50; SetPlayerSkin(para1, 50); PlayerInfo[para1][pJob] = 7; }
    else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Transporter"; ChosenSkin[para1] = 294; SetPlayerSkin(para1, 294); }
    else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Special Force"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Terroristen"; ChosenSkin[para1] = 142; SetPlayerSkin(para1, 142); }
    else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "San Trans"; ChosenSkin[para1] = 128; SetPlayerSkin(para1, 128); PlayerInfo[para1][pJob] = 16;}
    else { return 1; }
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    Invitefrak[para1] = PlayerInfo[playerid][pLeader];
    printf("AdmCmd: %s has invited %s to join %s.", sendername, giveplayer, ftext);
    format(string, sizeof(string), "%s hat dich in die Fraktion %s eingeladen.", sendername, ftext); SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    SendClientMessage(para1, COLOR_LIGHTBLUE, "Du kannst die Einladung mit \"/accept invite\" annehmen.");
    format(string, sizeof(string), "Du hast %s in die Fraktion %s eingeladen.", giveplayer,ftext);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is currently Wanted / a Different Team / or already a Family Member.");
    return 1;
    }
    }
    }//not connected
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Du bist kein Leader einer Fraktion.");
    }
    }
    return 1;
    }


    Frag einen anderen, nach /accept Invite, er soll sich an diese Punkte halten.
    Ich muss jetzt off, sry X(