Beiträge von DialogHD

    Du kannst es ja mal selber versuchen ;)


    Aber hier mal ein Beispiel:


    new Text3D:AdutyText[MAX_PLAYERS];


    in deinem Aduty Befehl:
    if(Aduty[playerid] == true) //anpassen
    {
    new Float:X,Float:Y,Float:Z
    GetPlayerPos(playerid,X,Y,Z);
    AdutyText[playerid] = Create3DTextLabel("Admin"/*Oder ein String*/,Schwarz,X,Y,Z/*Evtl die höhe anpassen*/,9,0);
    }
    else
    {
    Delete3DTextLabel(AdutyText[playerid]);
    }

    Bau das ein:
    if(giveplayer == playerid) return SendClientMessage(playerid,COLOR_RED,"Du kannst dich nicht selbter unfreezen.");

    ocmd:ak(playerid,params[])
    {
    new sendername[MAX_PLAYER_NAME];
    new result[256];
    new string[256];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(!sscanf(params,"s",result))return SendClientMessage(playerid,weiss,"INfo: ak [Text]");
    if(GetPVarInt(playerid,"Adminlevel") <= 3)return SendClientMessage(playerid,weiss,"Du bist kein Admin");
    if(GetPVarInt(playerid,"Adminlevel") == 10) { format(string,sizeof(string),"(( ServerOwner %s: %s ))",sendername,result); }
    else if(GetPVarInt(playerid,"Adminlevel") == 9) { format(string,sizeof(string),"(( Techniker %s: %s ))",sendername,result); }
    else if(GetPVarInt(playerid,"Adminlevel") == 8) { format(string,sizeof(string),"(( Co Owner %s: %s ))",sendername,result); }
    else if(GetPVarInt(playerid,"Adminlevel") == 7) { format(string,sizeof(string),"(( Servermanager %s: %s ))",sendername,result); }
    else if(GetPVarInt(playerid,"Adminlevel") == 6) { format(string,sizeof(string),"(( CumLeiter %s: %s ))",sendername,result); }
    else if(GetPVarInt(playerid,"Adminlevel") == 5) { format(string,sizeof(string),"(( Headadmin %s: %s ))",sendername,result); }
    else if(GetPVarInt(playerid,"Adminlevel") == 4) { format(string,sizeof(string),"(( Server-Admin %s: %s ))",sendername,result); }
    else if(GetPVarInt(playerid,"Adminlevel") == 3) { format(string,sizeof(string),"(( Server-Moderator %s: %s ))",sendername,result); }
    SendClientMessageToAll(weiss,string);
    return 1;
    }

    Hab das ganze mal etwas umgescriptet, vielleicht ist der Fehler dadurch ja verschwunden^^

    Natürlich, das ganze ist ja nicht als Copy & Paste gedacht.
    Sondern es soll dir eher eine vorstellung geben, wie man das ganze umsetzen kann.


    new Pickup = CreatePickup(/*Totenpickup*/);
    Das must du an dein Totenpickup anpassen.

    dein Code ist ja mal sehr durcheinander 8|


    Teste mal das hier:
    public OnPlayerUpdate(playerid)
    {
    new vehicleid;
    vehicleid = GetPlayerVehicleID(playerid);
    if(GetPlayerVehicleSeat(playerid) == 0)
    {
    if(GetVehicleModel(vehicleid) != 509 && GetVehicleModel(vehicleid) != 481 && GetVehicleModel(vehicleid) != 510)
    {
    new string[125];
    if(Tank[vehicleid] <= 0) format(string,sizeof string,"~g~Tank: ~r~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 5)
    {
    format(string,sizeof string,"~w~Tank: ~y~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I",Tank[vehicleid]);
    PlayerPlaySound(playerid, 1085, 0.0,0.0,10.0);
    }
    else if(Tank[vehicleid] <= 10)
    {
    format(string,sizeof string,"~w~Tank: ~g~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I",Tank[vehicleid]);
    PlayerPlaySound(playerid, 1085, 0.0,0.0,10.0);
    }
    else if(Tank[vehicleid] <= 15) format(string,sizeof string,"~w~Tank: ~g~I~y~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 20) format(string,sizeof string,"~w~Tank: ~g~I~g~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 25) format(string,sizeof string,"~w~Tank: ~g~I~g~I~y~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 30) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~r~I~r~I~r~I~r~I~r~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 35) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~y~I~r~I~r~I~r~I~r~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 40) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~g~I~r~I~r~I~r~I~r~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 45) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~g~I~y~I~r~I~r~I~r~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 50) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~g~I~g~I~r~I~r~I~r~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 55) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~g~I~g~I~y~I~r~I~r~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 60) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~g~I~g~I~g~I~r~I~r~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 65) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~g~I~g~I~g~I~y~I~r~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 70) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~g~I~g~I~g~I~g~I~r~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 75) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~g~I~g~I~g~I~g~I~y~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 80) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~g~I~g~I~g~I~g~I~g~I~r~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 85) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~g~I~g~I~g~I~g~I~g~I~y~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 90) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~g~I~g~I~g~I~g~I~g~I~g~I~r~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 95) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~g~I~g~I~g~I~g~I~g~I~g~I~y~I",Tank[vehicleid]);
    else if(Tank[vehicleid] <= 100) format(string,sizeof string,"~w~Tank: ~g~I~g~I~g~I~g~I~g~I~g~I~g~I~g~I~g~I~g~I",Tank[vehicleid]);
    TextDrawSetString(pSpeedo[playerid][2],string);
    }
    else
    {
    new string[125], Zustand[MAX_VEHICLES];
    GetVehicleHealth(vehicleid,Zustand[vehicleid])
    if(Zustand[vehicleid] <= 0) format(string,sizeof string,"~w~Zustand:~r~I",Zustand[vehicleid]);
    else if(Zustand[vehicleid] <= 250)
    {
    format(string,sizeof string,"~w~Zustand:~r~I",Zustand[vehicleid]);
    }
    else if(Tank[vehicleid] <= 500) { format(string,sizeof string,"~w~Zustand:~y~I",Zustand[vehicleid]); }
    else if(Tank[vehicleid] <= 1000) { format(string,sizeof string,"~w~Zustand:~g~I",Zustand[vehicleid]); }
    TextDrawSetString(pSpeedo[playerid][3],string);
    }
    }
    TextDrawSetString(pSpeedo[playerid][3], "~w~Zustand:~g~I");
    return 1;
    }
    Ausserdem empfehle ich dir anstatt OnPlayerUpdate mit einem Timer zu arbeiten.


    fast richtig, allerdings must du SetTimerEx benutzen, da er ja die playerid übernehmen muss.
    SetTimer("TruckerTimer",5000,0);
    zu
    SetTimerEx("TruckerTimer",5000,0,"d",playerid);

    new Geld[MAX_PICKUPS];


    unter OnPlayerDeath:
    new Pickup = CreatePickup(/*Totenpickup*/);
    Geld[Pickup] = GetPlayerMoney(playerid);


    OnPlayerPickUpPickup:
    if(pickupid == Geld[pickupid])
    {
    GivePlayerMoney(playerid,Geld[pickupid]);
    Geld[pickupid] = 0;
    }

    Hey, ich arbeite grad mit SetPlayerAttachedObject.
    Allerdings wird die Abfrage nicht erfüllt, warum?
    Ich möchte damit Abfragen ob Slot 1 belegt ist bzw ob er seine Maske trägt, oder geht das ganze garnicht damit?



    if(IsPlayerAttachedObjectSlotUsed(playerid,1))
    {
    SetPlayerAttachedObject(playerid, 1,19472, 2,0.000000,0.131999,-0.001999,-8.300000,85.999992,107.299964,0.964999,1.000000,1.000000);
    SendClientMessage(playerid,Grün,"Du hast dir deine Sauerstoffmaske angezogen.");
    return 1;
    }
    else {
    RemovePlayerAttachedObject(playerid,1);
    SendClientMessage(playerid,Grün,"Du hast dir deine Sauerstoffmaske ausgezogen.");
    return 1;
    }

    hab das ganze jetzt so gemacht: (um das ganze mal zu testen)
    AdmObj[playerid] = CreateObject(19472,0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    SetPlayerAttachedObject(playerid, 1,AdmObj[playerid], 2, X,Y,Z,rX,rY,rZ,0,0,0,0);


    allerdings wird nun garkein Objekt mehr angezeigt bzw es wird nicht zum Spieler gesetzt.


    Habe es jetzt hinbekommen ^^
    Habe es anschließend mit EditAttachedObject auf die ganaue Position gesetzt,
    nur wie bekomme ich von EditAttachedObject die Koordinaten, die ich doch in den Script einbauen muss...
    oder muss ich das garnicht?


    //Mein Code:
    AdmObj[playerid] = SetPlayerAttachedObject(playerid, 1,19472, 2);