Beiträge von Genetikkk

    So er stürzt nichtmehr ab und es kommen nirgends Warnings, es wird auch eine .ini erstellt, aber eine leere... Und InGame passiert auch nichts... Hier nochmal genau der Teil an dem es klemmt:
    CMD:sup(playerid,params[])
    {
    new text[256];
    if(sscanf(params,"s[128]",text))
    {
    SendClientMessage(playerid, COLOR_RED,"[TICKETSYSTEM]: /sup [text]");
    }
    else
    {
    if(TicketAngenommen[playerid] == 0)
    {
    new pname[MAX_PLAYER_NAME],save[512], string[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(save,sizeof save,"Tickets/%s.ini",pname);
    dini_Create(save);
    if(!dini_Exists(save) && TicketZeile[playerid] == 0) // Wenn noch kein Ticket existiert und auch die TicketZeile auf 0 ist.
    {
    new adminmeldung[128];
    format(adminmeldung, sizeof(adminmeldung), "[TICKETSYSTEM] %s has writen an Support Ticket", pname);
    SendAdminMessage(COLOR_GREEN, adminmeldung);
    SupportTicket[playerid] = 1;
    TicketZeile[playerid] = 1;
    dini_Create(save);
    dini_Set(save,"Suptext",text);
    SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] You have send a Ticket with the following Text:");
    format(string, sizeof(string), "%s", text);
    SendClientMessage(playerid, COLOR_GREEN, string);
    SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] Please wait till an Supporter accept it!");
    SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] You can add another line with /sup 2");
    return 1;
    }
    else if(TicketZeile[playerid] == 1) // Wenn die erste Zeile schon geschrieben wurde
    {
    new string2[128];
    dini_Set(save, "Suptext2",text);
    SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] You have added the following Line:");
    format(string2, sizeof(string2), "%s", text);
    SendClientMessage(playerid, COLOR_GREEN, string2);
    TicketZeile[playerid] = 2;
    return 1;
    }
    else if(TicketZeile[playerid] == 2) // Wenn bereits 2 Zeilen ausgefüllt sind
    {
    new string3[128];
    dini_Set(save, "Suptext3",text);
    SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] You have added the following Line:");
    format(string3, sizeof(string3), "%s", text);
    SendClientMessage(playerid, COLOR_GREEN, string3);
    TicketZeile[playerid] = 3;
    return 1;
    }
    else if(TicketZeile[playerid] == 3) // Wenn das Ticket bereits 3 Zeilen hat
    {
    SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] You can write max. 3 lines!");
    return 1;
    }
    }
    if(TicketAngenommen[playerid] == 1) // Zum direkten Antworten per /sup , wenn das Ticket angenommen wurde.
    {
    new pID = DeinSupport[playerid];
    new antwort[128], antwort2[128], DerFragende[MAX_PLAYER_NAME], DerSup[MAX_PLAYER_NAME];
    GetPlayerName(playerid, DerFragende, sizeof (DerFragende));
    GetPlayerName(pID, DerSup, sizeof (DerSup));
    format(antwort, sizeof (antwort),"--> %s", text);
    SendClientMessage(playerid, COLOR_GREEN, antwort);
    format(antwort2, sizeof (antwort2), "%s wrote: %s", DerFragende, text);
    SendClientMessage(pID, COLOR_GREEN, antwort2);
    }


    }
    return 1;
    }

    Rocky, eigentlich schon, schau doch mal im Link, da steht alles ...
    Vielen Dank, wenn jemand die Lösung findet !


    //edit Meines erachtens ist alles richtig geschrieben hier ein neuer Link beim alten war was falsch, trotzdem stürzt er direkt ab ...


    CMD:sup(playerid,params[])
    {
    new text[256];
    if(sscanf(params,"s",text))
    {
    SendClientMessage(playerid, COLOR_RED,"[TICKETSYSTEM]: /sup [text]");
    }
    else
    {
    if(TicketAngenommen[playerid] == 0)
    {
    new pname[MAX_PLAYER_NAME],save[512], string[128];
    GetPlayerName(playerid,pname,sizeof pname);
    format(save,sizeof(save),"Tickets/%s.ini",pname);
    dini_Create(string);
    if(!dini_Exists(save) && TicketZeile[playerid] == 0) // Wenn noch kein Ticket existiert und auch die TicketZeile auf 0 ist.
    {
    new adminmeldung[128];
    format(adminmeldung, sizeof(adminmeldung), "[TICKETSYSTEM] %s has writen an Support Ticket", pname);
    SendAdminMessage(COLOR_GREEN, adminmeldung);
    SupportTicket[playerid] = 1;
    TicketZeile[playerid] = 1;
    dini_Create(save);
    dini_Set(save,"Suptext",text);
    SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] You have send a Ticket with the following Text:");
    format(string, sizeof(string), "%s", text);
    SendClientMessage(playerid, COLOR_GREEN, string);
    SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] Please wait till an Supporter accept it!");
    SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] You can add another line with /sup 2");
    return 1;
    }
    else if(TicketZeile[playerid] == 1) // Wenn die erste Zeile schon geschrieben wurde
    {
    new string2[128];
    dini_Set(save, "Suptext2",text);
    SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] You have added the following Line:");
    format(string2, sizeof(string2), "%s", text);
    SendClientMessage(playerid, COLOR_GREEN, string2);
    TicketZeile[playerid] = 2;
    return 1;
    }
    else if(TicketZeile[playerid] == 2) // Wenn bereits 2 Zeilen ausgefüllt sind
    {
    new string3[128];
    dini_Set(save, "Suptext3",text);
    SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] You have added the following Line:");
    format(string3, sizeof(string3), "%s", text);
    SendClientMessage(playerid, COLOR_GREEN, string3);
    TicketZeile[playerid] = 3;
    return 1;
    }
    else if(TicketZeile[playerid] == 3) // Wenn das Ticket bereits 3 Zeilen hat
    {
    SendClientMessage(playerid, COLOR_GREEN, "[SUPPORT] You can write max. 3 lines!");
    return 1;
    }
    }
    if(TicketAngenommen[playerid] == 1) // Zum direkten Antworten per /sup , wenn das Ticket angenommen wurde.
    {
    new pID = DeinSupport[playerid];
    new antwort[128], antwort2[128], DerFragende[MAX_PLAYER_NAME], DerSup[MAX_PLAYER_NAME];
    GetPlayerName(playerid, DerFragende, sizeof (DerFragende));
    GetPlayerName(pID, DerSup, sizeof (DerSup));
    format(antwort, sizeof (antwort),"--> %s", text);
    SendClientMessage(playerid, COLOR_GREEN, antwort);
    format(antwort2, sizeof (antwort2), "%s wrote: %s", DerFragende, text);
    SendClientMessage(pID, COLOR_GREEN, antwort2);
    }


    }
    return 1;
    }

    CMD:taketicket(playerid,params[])
    {
    new pID;
    new string2[256], string[256], string3[256], string4[256],mitteilung[128] , DerPlayer[MAX_PLAYER_NAME], DerAdmin[MAX_PLAYER_NAME];
    if(sscanf(params,"u",pID)){
    return SendClientMessage(playerid, COLOR_RED,"[TICKETSYSTEM]: /taketicket [id]");
    }
    new pname[MAX_PLAYERS],save[512];
    GetPlayerName(pID,pname,sizeof pname);
    format(save,sizeof(save),"Tickets/%s.ini",pname);
    if(dini_Exists(save)) // Ob ein Ticket existiert! bzw. Datei-Abfrage
    {
    if(PlayerInfo[playerid][AdminLevel] >= 1) // Ob der Spieler ein Supporter ist!
    {
    if(TicketAngenommen[pID] == 0)
    {
    string2 = dini_Get(save,"Suptext");
    string3 = dini_Get(save,"Suptext2");
    string4 = dini_Get(save,"Suptext3");
    GetPlayerName(pID, DerPlayer, sizeof(DerPlayer));
    GetPlayerName(playerid, DerAdmin, sizeof(DerAdmin));
    format(string, sizeof(string), "%s wrote the following Support-Message:", DerPlayer);
    SendClientMessage(playerid, COLOR_GREEN, string);
    SendClientMessage(playerid, COLOR_GREEN, string2);
    SendClientMessage(playerid, COLOR_GREEN, string3);
    SendClientMessage(playerid, COLOR_GREEN, string4);
    SendClientMessage(playerid, COLOR_GREEN, "You can answer per /aw [text]");
    format(mitteilung, sizeof(mitteilung), "[SUPPORT] %s has opend your Ticket. You now can write live per /sup with him !",DerAdmin);
    SendClientMessage(pID, COLOR_YELLOW, mitteilung);
    DeinSupport[pID] = playerid; // Der persönliche Supporter wird gesetzt , um die Antworten an ihn weiterzuleiten
    TicketAngenommen[pID] = 1;
    }
    }
    }
    return 1;
    }


    CMD:deleteticket(playerid, params[])
    {
    new pID;
    if(sscanf(params,"u",pID)){
    return SendClientMessage(playerid, COLOR_RED,"[TICKETSYSTEM]: /deleteticket [id]");
    }
    new pname[MAX_PLAYER_NAME],save[512];
    GetPlayerName(pID,pname,sizeof pname);
    format(save,sizeof save,"Tickets/%s.ini",pname);
    if(dini_Exists(save)) // Ob ein Ticket offen ist
    {
    if(PlayerInfo[playerid][AdminLevel] >= 1) // Ob der Spieler befugt ist
    {
    new string[128], DerSup[MAX_PLAYER_NAME];
    GetPlayerName(playerid, DerSup, sizeof(DerSup));
    dini_Remove(save);
    format(string, sizeof(string), "%s has closed your Ticket", DerSup);
    SendClientMessage(pID, COLOR_YELLOW, string);
    SendClientMessage(playerid, COLOR_YELLOW, "Sucessfully deleted");
    TicketZeile[pID] = 0;
    TicketAngenommen[pID] = 0;
    DeinSupport[pID] = 0;
    SupportTicket[pID] = 0;
    }
    }
    return 1;
    }


    CMD:giveticket(playerid, params[])
    {
    new pID, adminid;
    if(sscanf(params,"uu",pID,adminid)){
    return SendClientMessage(playerid, COLOR_RED,"[TICKETSYSTEM]: /giveticket [ticketid] [adminid]");
    }
    if(!IsPlayerConnected(adminid)) // Ob die angegebene ID online ist.
    {
    return SendClientMessage(playerid, COLOR_RED,"[TICKETSYSTEM] Admin isn't online");
    }
    if(PlayerInfo[adminid][AdminLevel] == 0) // Ob die angegebene ID Admin ist
    {
    return SendClientMessage(playerid, COLOR_RED, "[TICKETSYSTEM] This Player isn't an Admin");
    }
    new pname[MAX_PLAYERS],save[512];
    GetPlayerName(pID,pname,sizeof pname);
    format(save,sizeof(save),"Tickets/%s.ini",pname);
    if(!dini_Exists(save)) // Ob ein Ticket besteht
    {
    return SendClientMessage(playerid, COLOR_RED,"This ID has not an open Ticket");
    }
    new NeuerAdmin[MAX_PLAYER_NAME], AlterAdmin[MAX_PLAYER_NAME], Fragender[MAX_PLAYER_NAME];
    GetPlayerName(playerid, AlterAdmin , sizeof(AlterAdmin));
    GetPlayerName(adminid, NeuerAdmin, sizeof(NeuerAdmin));
    GetPlayerName(pID, Fragender , sizeof(Fragender));
    DeinSupport[pID] = adminid;
    new string2[128], string3[128], string4[256], string5[256], string6[256];
    format(string2, sizeof(string2), "[SUPPORT] %s has passed your Ticket to %s .", AlterAdmin, NeuerAdmin);
    SendClientMessage(pID, COLOR_GREEN, string2);
    SendClientMessage(playerid, COLOR_GREEN, "[TICKETSYSTEM] Sucessfully passed");
    format(string3, sizeof(string3), "[SUPPORT] %s has passed %s´s Ticket to you. He asked:", AlterAdmin, Fragender);
    string4 = dini_Get(save, "Suptext");
    string5 = dini_Get(save, "Suptext2");
    string6 = dini_Get(save, "Suptext3");
    SendClientMessage(adminid, COLOR_GREEN, string3);
    SendClientMessage(adminid, COLOR_GREEN, string4);
    SendClientMessage(adminid, COLOR_GREEN, string5);
    SendClientMessage(adminid, COLOR_GREEN, string6);
    return 1;
    }


    CMD:tickets(playerid, params[])
    {
    #pragma unused params
    if(PlayerInfo[playerid][AdminLevel] >= 1)
    {
    SendClientMessage(playerid, COLOR_GREEN, "[TICKETSYSTEM] The shown Tickets can be opend with /taketicket [id]");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(SupportTicket[i] == 1)
    {
    if(TicketAngenommen[i] == 0)
    {
    new string[128], DerSpieler[MAX_PLAYER_NAME];
    GetPlayerName(i, DerSpieler, sizeof(DerSpieler));
    format(string, sizeof(string), "ID: %d Name: %s", i, DerSpieler);
    SendClientMessage(playerid, COLOR_GREY, string);
    }
    }
    }
    }
    return 1;
    }
    //
    //TICKETSYSTEM
    stock DeleteTicket(playerid)
    {
    new save1[256], pname[MAX_PLAYERS];
    GetPlayerName(playerid,pname,sizeof pname);
    format(save1,sizeof save1,"Tickets/%s.ini",pname);
    if(fexist(save1))
    {
    dini_Remove(save1);
    }
    return true;
    }
    //