Beiträge von Sony

    Hier müsste klappen


    public OnPlayerConnect(playerid)
    {
    new pname[MAX_PLAYERS],accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"%s.datei",pname);
    if(fexist(accFormat))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Weiter","Abbrechen");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte Registriere dich","Weiter","Abbrechen");
    }
    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    new pname[MAX_PLAYERS],accFormat[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(accFormat,sizeof accFormat,"%s.datei",pname);
    if(response)
    {
    switch(dialogid) // dialogid auswählen
    {
    case DIALOG_LOGIN: // ID Login
    {
    if(!strlen(inputtext))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Weiter","Abbrechen");
    return SendClientMessage(playerid,0xFFFFFFFF,"Kein Passwort angegeben!");
    }
    if(strcmp(inputtext,dini_Get(accFormat,"Passwort")) == 0) // Passwort Direkt aus der Datei Laden
    {
    Spieler[playerid][Admin] = dini_Int(accFormat,"Admin");
    Spieler[playerid][wanted] = dini_Int(accFormat,"wanted");
    Spieler[playerid][aFuhrerschein] = dini_Int(accFormat,"aFuhrerschein");
    Spieler[playerid][skin] = dini_Int(accFormat,"skin");
    Spieler[playerid][lastx] = dini_Float(accFormat,"lastx");
    Spieler[playerid][lasty] = dini_Float(accFormat,"lasty");
    Spieler[playerid][lastz] = dini_Float(accFormat,"lastz");
    GivePlayerMoney(playerid,dini_Int(accFormat,"Geld"));
    SetPlayerScore(playerid,dini_Int(accFormat,"Score"));
    Spieler[playerid][eingeloggt] = 1; // Spieler ist nun erfolgreich eingeloggt
    SendClientMessage(playerid,0xFFFFFFFF,"Du wurdest erfolgreich eingeloggt.");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Weiter","Abbrechen");
    SendClientMessage(playerid,0xFFFFFFFF,"Das Passwort war Falsch!");
    }
    }
    case DIALOG_REG: // ID Registrieren
    {
    if(!strlen(inputtext)) // Text darf nicht = Null sein Null im Sinne von nichts
    {
    ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte Registriere dich","Weiter","Abbrechen");
    return SendClientMessage(playerid,0xFFFFFFFF,"Das Passwort ist zu kurz!");
    }
    dini_Create(accFormat);
    dini_Set(accFormat,"Passwort",inputtext);
    Spieler[playerid][eingeloggt] = 1;
    SendClientMessage(playerid,0xFFFFFFFF,"Account wurde angelegt und du wurdest eingeloggt.");
    }
    }
    }
    else
    {
    switch(dialogid)
    {
    case DIALOG_LOGIN:ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login","Bitte logge dich ein","Weiter","Abbrechen");
    case DIALOG_REG:ShowPlayerDialog(playerid,DIALOG_REG,1,"Registrieren","Bitte Registriere dich","Weiter","Abbrechen");
    }
    }
    if(dialogid == SHmenu) // Name des Menüs, das wir als ID 0 definiert haben
    {
    if(response)
    {
    if(listitem == 0) // Fuehrerschein
    {
    if(GetPlayerMoney(playerid) < preise[listitem])return SendClientMessage(playerid,0xFFFFFFFF,"Du hast nicht genug Geld.");
    if(Spieler[playerid][aFuhrerschein] >= 1 )return SendClientMessage(playerid,0xFFFFFFFF,"Du hast bereits den führerschein.");
    GivePlayerMoney(playerid, -2000);
    SendClientMessage(playerid,0xFFFFFFFF,"Du hast dir den Führerschein Gekauft");
    Spieler[playerid][aFuhrerschein] = 1;
    }

    #include <a_samp>
    #define FILTERSCRIPT
    #if defined FILTERSCRIPT
    #pragma tabsize 0
    //forward's
    forward GateClosegate1();
    forward GateClosegate2();
    //new's
    new gate1;
    new gate2;


    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" Wolverine's Parkhaus");
    print("--------------------------------------\n");
    CreateObject(1245, 774.08209228516, -2369.9304199219, 7.5411338806152, 0, 0, 323.740234375);
    CreateObject(7419, 1177.974609375, -2672.3762207031, -6.2250018119812, 0, 0, 210.67565917969);
    CreateObject(5112, 1256.0168457031, -2591.1340332031, -3.726505279541, 0, 0, 29.774780273438);
    CreateObject(2942, 1214.1489257813, -2606.4479980469, 1.9161920547485, 0, 0, 29.524780273438);
    gate1 = CreateObject(971, 1201.6263427734, -2624.2524414063, 3.4412221908569, 0, 0, 300.45043945313);
    gate2 = CreateObject(971, 1199.4272460938, -2620.482421875, 3.4412221908569, 0, 0, 300.44860839844);
    CreateObject(967, 1206.0581054688, -2627.8723144531, 0.69399070739746, 0, 0, 29.539794921875);
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp(cmdtext, "/torauf", true) == 0)
    {
    MoveObject(gate1,52.191380, -1535.649902, 3.606586, 4);
    SetTimer("GateCloseZoll1", 4000, 0);
    return 1;
    }
    if (strcmp(cmdtext, "/torauf", true) == 0)
    {
    MoveObject(gate2,1199.4272460938, -2620.482421875, 5.4412221908569,4);
    SetTimer("GateCloseZoll2", 4000, 0);
    return 1;
    }
    return 0;
    }


    public GateClosegate1()
    {
    MoveObject(gate1,1201.6263427734, -2624.2524414063, 5.4412221908569,4);
    return 1;
    }


    public GateClosegate2()
    {
    MoveObject (gate2,1199.4272460938, -2620.482421875, 3.4412221908569, 3.5);
    return 1;
    }



    #endif


    hier hoffe klappt alles

    mach des mal so


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/torauf", cmdtext, true) == 0){
    MoveObject(gate1,1201.6263427734, -2624.2524414063, 5.4412221908569,4);
    SetTimer("gate1", 5000, 0);
    return 1;
    }
    if (strcmp("/torauf", cmdtext, true) == 0){
    MoveObject(gate2,1199.4272460938, -2620.482421875, 5.4412221908569,4);
    SetTimer("gate2", 5000, 0);
    return 1;
    }
    return 1;
    }

    versuch des mal so


    #include <a_samp>


    #pragma tabsize 0
    #define COLOR_YELLOW 0xFFFF00AA
    #define FILTERSCRIPT
    #if defined FILTERSCRIPT
    new y_gate;
    forward GateClosey_gate();


    public OnFilterScriptInit()
    {
    y_gate = CreateObject(969, 1584.246216, -1637.993896, 12.675032, 0.0000, 0.0000, 0.0000);
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    #else


    #endif
    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp(cmdtext, "/ls_tor", true) == 0)
    {
    MoveObject(y_gate,1592.593384, -1637.821167, 12.585632,2);
    SetTimer("GateClosey_gate", 4000, 0);
    }
    return 0;
    }
    public GateClosey_gate()
    {
    MoveObject(y_gate,1584.246216, -1637.993896,12.675032,2);
    return 1;
    }


    sag bescheit wens net geht