Dialog auswahl geht nicht

In 10 Minuten startet der nächtliche Backupvorgang! Es kann währenddessen (ca. 10 Minuten) zu Einschränkungen bei der Nutzung des Forums kommen
Weitere Infos findet ihr im Thema Backup des Forums
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
  • Hi


    Ich hab ein Fs in das ich kleinere Funktionen schreibe. Wenn ich das deaktiviere fünktioniert alles. Könntest du dir das mal anschauen, ich finde nähmlich keinen Fehler :)

    #define COMMAND_COLOR 0x00FF00FF
    #define ADMIN_COLOR 0xFFFF00FF
    #define CONNECT_COLOR 0x00FFFFFF
    #define DISCONNECT_COLOR 0x666666FF



    #include <a_samp>



    //NEWS
    new nitro[MAX_PLAYERS] = 1; //Auto Nitro
    new repair[MAX_PLAYERS] = 1; //Auto Repair



    new Text:HClock; // REAL TIME
    new Text:HClock2;
    new Text:HClock3;
    new TimeTimer;




    //FORWARDS
    forward AutoR(); //Auto Repair
    forward IsABike(playerid); //Helm
    forward TimeUpdate(); //REAL TIME







    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" Add ons");
    print("--------------------------------------\n");

    SetTimer("AutoR", 1000, 1); //Autorepair


    // Real-Time


    TimeTimer = SetTimer("TimeUpdate",1000,1);


    HClock = TextDrawCreate(547, 40, "--:--");
    TextDrawLetterSize(HClock, 0.5, 1.5);
    TextDrawFont(HClock, 2);
    TextDrawSetShadow(HClock, 2);
    TextDrawSetOutline(HClock,2);


    HClock2 = TextDrawCreate(607, 40, "--");
    TextDrawLetterSize(HClock2, 0.4, 1.1);
    TextDrawFont(HClock2, 2);
    TextDrawSetShadow(HClock2, 2);
    TextDrawSetOutline(HClock2,2);


    HClock3 = TextDrawCreate(520, 105, "--/--/----");
    TextDrawLetterSize(HClock3, 0.4, 1.1);
    TextDrawFont(HClock3, 2);
    TextDrawSetShadow(HClock3, 2);
    TextDrawSetOutline(HClock3,2);

    return 1;

    }


    public OnFilterScriptExit()
    {


    KillTimer(TimeTimer);
    TextDrawDestroy(HClock);
    TextDrawDestroy(HClock2);
    TextDrawDestroy(HClock3);
    return 1;
    }



    public OnPlayerRequestClass(playerid, classid)
    {


    }


    public OnPlayerConnect(playerid)
    {



    //JOIN MESSAGE
    new string[64], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string,sizeof string,">>JOIN<< %s hat den Server betreten.",pName);
    SendClientMessageToAll(CONNECT_COLOR,string);
    // --------------


    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {



    //LEAVE MESSAGE
    new string[64], pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
    switch(reason)
    {
    case 0: format(string,sizeof string,">>LEAVE<< %s hat den Server verlassen. (Timeout)",pname);
    case 1: format(string,sizeof string,">>LEAVE<< %s hat den Server verlassen. (Disconnect)",pname);
    case 2: format(string,sizeof string,">>LEAVE<< %s hat den Server verlassen. (Gekickt)",pname);
    }
    SendClientMessageToAll(DISCONNECT_COLOR,string);
    //------------


    return 1;
    }



    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/nitro", cmdtext, true, 10) == 0) // Nitro an/aus
    {
    if (nitro[playerid] == 1)
    {
    SendClientMessage(playerid, COMMAND_COLOR, "Automatisches Nitro ausgeschaltet.");
    nitro[playerid] = 0;
    }
    else
    {
    SendClientMessage(playerid, COMMAND_COLOR, "Automatisches Nitro eingeschaltet.");
    nitro[playerid] = 1;
    }
    return 1;
    }


    if (strcmp("/autorepair", cmdtext, true, 10) == 0) // Autorepair an/aus
    {
    if (repair[playerid] == 1)
    {
    SendClientMessage(playerid, COMMAND_COLOR, "Automatische Fahrzeugreperatur ausgeschaltet.");
    repair[playerid] = 0;
    }
    else
    {
    SendClientMessage(playerid, COMMAND_COLOR, "Automatische Fahrzeugreperatur eingeschaltet.");
    repair[playerid] = 1;
    }
    return 1;
    }





    return 0;
    }



    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {


    //AUTO NITRO
    if( newkeys == 1 || newkeys == 9 || newkeys == 33 && oldkeys != 1 || oldkeys != 9 || oldkeys != 33)
    {
    if ( nitro[playerid] == 1 )
    {
    new Car = GetPlayerVehicleID(playerid), Model = GetVehicleModel(Car);
    switch(Model)
    {
    case 446,432,448,452,424,453,454,461,462,463,468,471,430,472,449,473,481,484,493,495,509,510,521,538,522,523,532,537,570,581,586,590,569,595,604,611: return 0;
    }
    AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
    }
    }




    return 1;
    }


    public OnRconLoginAttempt(ip[], password[], success)
    {
    if (success)
    {
    SendClientMessageToAll(ADMIN_COLOR,">>ADMIN<< Ein Admin hat sich angemeldet.");
    return 1;
    }


    return 1;
    }



    //OWN PUBLICS
    public AutoR() {
    for(new playerid=0; playerid<MAX_PLAYERS; playerid++) {
    if(IsPlayerConnected(playerid)) {
    new Float:health, cid;
    if (IsPlayerInAnyVehicle(playerid)) {
    if (repair[playerid] == 1)
    {
    cid = GetPlayerVehicleID(playerid);
    GetVehicleHealth(cid, health);
    if (health < 1000) {
    SetVehicleHealth(cid,1000);
    RepairVehicle(cid);
    }
    }
    }
    }
    }
    return 1;
    }



    public TimeUpdate() //REAL TIME
    {
    new Hour, Min, Sec, Day, Month, Year;
    new TimeString[256], TimeString2[256], TimeString3[256];
    gettime(Hour, Min, Sec);
    getdate(Year, Month, Day);
    if(Min <= 9)
    {
    format(TimeString,25,"%d:0%d",Hour, Min);
    }else{
    format(TimeString,25,"%d:%d",Hour, Min);
    }
    if(Sec <= 9)
    {
    format(TimeString2,25,"0%d", Sec);
    }else{
    format(TimeString2,25,"%d", Sec);
    }
    if(Day <= 9)
    {
    format(TimeString3,25,"0%d/%d/%d", Day, Month, Year);
    }else{
    format(TimeString3,25,"%d/%d/%d", Day, Month, Year);
    }
    TextDrawSetString(HClock,TimeString);
    TextDrawShowForAll(HClock);
    TextDrawSetString(HClock2,TimeString2);
    TextDrawShowForAll(HClock2);
    TextDrawSetString(HClock3,TimeString3);
    TextDrawShowForAll(HClock3);
    return 1;
    }