Guten Tag,
mein Server schminkt ab sofern ich einen Ticket annehme (/att ID)
if(strcmp(cmd, "/att", true) == 0){ //ticket annehmen
if(PlayerInfo[playerid][Team] == 21){
return 1;
}
if(PlayerInfo[playerid][ALevel] == 0) {
MeldungText(playerid, "Du bist nicht befugt!", 5);
return 1;
}
if(ticketanwser[playerid] != -1){
MeldungText(playerid, "Du bearbeitest schon ein anderes Ticket!", 5);
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
MeldungText(playerid, "Verwendung: /att [PlayerID]", 6);
return 1;
}
new player1;
player1 = strval(tmp);
if(ticket[player1] == 0){
format(string,256,"%s (ID: %d) hat kein Ticket!", PlayerName(player1), player1);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
if(ticket[player1] == 1 && tickerid[player1] !=-1){
format(string,256,"%s (ID: %d) Ticket wird schon bearbeitet", PlayerName(player1), player1);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
tickerid[player1] = playerid;
ticketanwser[playerid] = player1;
ticketzeit[player1] = 0;
ShowTicketSystem();
PlayerInfo[playerid][tickets]++;
format(string,256,"Admin %s (ID: %d) hat dein Ticket angenommen.", PlayerName(playerid), playerid);
SendClientMessage(player1, COLOR_LIGHTBLUE, string);
SendClientMessage(player1, GREY, "Du kannst nun ganz normal im Chat mit dem Admin schreiben.");
format(string,256,"Du nimmst das Ticket von %s (ID: %d) an.", PlayerName(player1), player1);
SendClientMessage(playerid, GREY, string);
format(string,sizeof(string),"%s nimmt das Ticket von %s an",PlayerName(playerid),PlayerName(player1));
ABroadCast(COLOR_RED, string, 1);
AdminTicketLog(PlayerName(playerid),string);
format(string,sizeof(string),"Ticketgrund: %s",PlayerInfo[player1][ticketgrund]);
AdminTicketLog(PlayerName(playerid),string);
return 1;
}