Moin.
ocmd:sup(playerid,params[])
{
new text[256];
if(sscanf(params,"s",text))
{
SendClientMessage(playerid, GRAU,"[Benutzung]: /sup [text]");
}
else
{
if(TicketAngenommen[playerid] == 0)
{
new pname[MAX_PLAYERS],save[512], string[128];
GetPlayerName(playerid,pname,sizeof pname);
format(save,sizeof save,"Tickets/%s.ini",pname);
if(!dini_Exists(save) && TicketZeile[playerid] == 0)
{
new adminmeldung[128];
format(adminmeldung, sizeof(adminmeldung), "%s hat ein Support-Ticket geschrieben", pname);
SendAdminMessage(COLOR_YELLOW, adminmeldung);
SupportTicket[playerid] = 1;
TicketZeile[playerid] = 1;
dini_Create(save);
dini_Set(save,"Suptext",text);
SendClientMessage(playerid, COLOR_YELLOW, "[SUPPORT] Du hast ein Ticket mit folgendem Text geöffnet:");
format(string, sizeof(string), "%s", text);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(playerid, COLOR_YELLOW, "[SUPPORT]Warte bis es ein Supporter annimmt!");
SendClientMessage(playerid, COLOR_YELLOW, "[SUPPORT]Du kannst noch mit /sup 2 weitere Zeilen anhängen");
return 1;
}
else if(TicketZeile[playerid] == 1)
{
new string2[128];
dini_Set(save, "Suptext2",text);
SendClientMessage(playerid, COLOR_YELLOW, "[SUPPORT] Du hast folgendes an dein Ticket anhängt:");
format(string2, sizeof(string2), "%s", text);
SendClientMessage(playerid, COLOR_YELLOW, string2);
TicketZeile[playerid] = 2;
return 1;
}
else if(TicketZeile[playerid] == 2)
{
new string3[128];
dini_Set(save, "Suptext3",text);
SendClientMessage(playerid, COLOR_YELLOW, "[SUPPORT] Du hast folgendes an dein Ticket anhängt:");
format(string3, sizeof(string3), "%s", text);
SendClientMessage(playerid, COLOR_YELLOW, string3);
TicketZeile[playerid] = 3;
return 1;
}
else if(TicketZeile[playerid] == 3)
{
SendClientMessage(playerid, COLOR_YELLOW, "[SUPPORT] Dein Ticket ist bereits randgefüllt!");
return 1;
}
}
if(TicketAngenommen[playerid] == 1)
{
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_YELLOW, antwort);
format(antwort2, sizeof (antwort2), "%s schrieb: %s", DerFragende, text);
SendClientMessage(pID, COLOR_YELLOW, antwort2);
}
}
return 1;
}
return 1;
}
ocmd:giveticket(playerid, params[])
{
new pID, adminid;
if(sscanf(params,"uu",pID,adminid)){
return SendClientMessage(playerid, COLOR_GREY,"[Benutzung]: /giveticket [ticketid] [adminid]");
}
if(!IsPlayerConnected(adminid))
{
return SendClientMessage(playerid, COLOR_GREY,"Admin nicht online");
}
if(pInfo[adminid][admin] == 0)
{
return SendClientMessage(playerid, COLOR_GREY, "Der Spieler ist kein Admin");
}
new pname[MAX_PLAYERS],save[512];
GetPlayerName(pID,pname,sizeof pname);
format(save,sizeof save,"Tickets/%s.ini",pname);
if(!dini_Exists(save))
{
return SendClientMessage(playerid, COLOR_GREY,"Die ID hat kein offenes 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 hat dein Ticket an %s weitergegeben.", AlterAdmin, NeuerAdmin);
SendClientMessage(pID, COLOR_YELLOW, string2);
SendClientMessage(playerid, COLOR_YELLOW, "Erfolgreich weitergeleitet");
format(string3, sizeof(string3), "[SUPPORT] %s hat dir %s´s Ticket gegeben. Er schrieb folgendes:", AlterAdmin, Fragender);
string4 = dini_Get(save, "Suptext");
string5 = dini_Get(save, "Suptext2");
string6 = dini_Get(save, "Suptext3");
SendClientMessage(adminid, COLOR_YELLOW, string3);
SendClientMessage(adminid, COLOR_YELLOW, string4);
SendClientMessage(adminid, COLOR_YELLOW, string5);
SendClientMessage(adminid, COLOR_YELLOW, string6);
return 1;
}
{
new pID, adminid;
if(sscanf(params,"uu",pID,adminid)){
return SendClientMessage(playerid, COLOR_GREY,"[Benutzung]: /giveticket [ticketid] [adminid]");
}
if(!IsPlayerConnected(adminid))
{
return SendClientMessage(playerid, COLOR_GREY,"Admin nicht online");
}
if(pInfo[adminid][admin] == 0)
{
return SendClientMessage(playerid, COLOR_GREY, "Der Spieler ist kein Admin");
}
new pname[MAX_PLAYERS],save[512];
GetPlayerName(pID,pname,sizeof pname);
format(save,sizeof save,"Tickets/%s.ini",pname);
if(!dini_Exists(save))
{
return SendClientMessage(playerid, COLOR_GREY,"Die ID hat kein offenes 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 hat dein Ticket an %s weitergegeben.", AlterAdmin, NeuerAdmin);
SendClientMessage(pID, COLOR_YELLOW, string2);
SendClientMessage(playerid, COLOR_YELLOW, "Erfolgreich weitergeleitet");
format(string3, sizeof(string3), "[SUPPORT] %s hat dir %s´s Ticket gegeben. Er schrieb folgendes:", AlterAdmin, Fragender);
string4 = dini_Get(save, "Suptext");
string5 = dini_Get(save, "Suptext2");
string6 = dini_Get(save, "Suptext3");
SendClientMessage(adminid, COLOR_YELLOW, string3);
SendClientMessage(adminid, COLOR_YELLOW, string4);
SendClientMessage(adminid, COLOR_YELLOW, string5);
SendClientMessage(adminid, COLOR_YELLOW, string6);
return 1;
}
ocmd:deleteticket(playerid, params[])
{
new pID;
if(sscanf(params,"u",pID)){
return SendClientMessage(playerid, COLOR_GREY,"[Benutzung]: /deleteticket [id]");
}
new pname[MAX_PLAYERS],save[512];
GetPlayerName(pID,pname,sizeof pname);
format(save,sizeof save,"Tickets/%s.ini",pname);
if(dini_Exists(save))
{
if(pInfo[playerid][admin] >= 1)
{
new string[128], DerSup[MAX_PLAYER_NAME];
GetPlayerName(playerid, DerSup, sizeof(DerSup));
dini_Remove(save);
format(string, sizeof(string), "%s hat dein Ticket gelöscht", DerSup);
SendClientMessage(pID, COLOR_YELLOW, string);
SendClientMessage(playerid, COLOR_YELLOW, "Erfolgreich gelöscht");
TicketZeile[pID] = 0;
TicketAngenommen[pID] = 0;
DeinSupport[pID] = 0;
SupportTicket[pID] = 0;
}
}
return 1;
}
{
new pID;
if(sscanf(params,"u",pID)){
return SendClientMessage(playerid, COLOR_GREY,"[Benutzung]: /deleteticket [id]");
}
new pname[MAX_PLAYERS],save[512];
GetPlayerName(pID,pname,sizeof pname);
format(save,sizeof save,"Tickets/%s.ini",pname);
if(dini_Exists(save))
{
if(pInfo[playerid][admin] >= 1)
{
new string[128], DerSup[MAX_PLAYER_NAME];
GetPlayerName(playerid, DerSup, sizeof(DerSup));
dini_Remove(save);
format(string, sizeof(string), "%s hat dein Ticket gelöscht", DerSup);
SendClientMessage(pID, COLOR_YELLOW, string);
SendClientMessage(playerid, COLOR_YELLOW, "Erfolgreich gelöscht");
TicketZeile[pID] = 0;
TicketAngenommen[pID] = 0;
DeinSupport[pID] = 0;
SupportTicket[pID] = 0;
}
}
return 1;
}
ocmd: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, GRAU,"[Benutzung]: /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))
{
if(pInfo[playerid][admin] >= 1)
{
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 schrieb folgende Supportnachricht:", DerPlayer);
SendClientMessage(playerid, GELB, string);
SendClientMessage(playerid, GELB, string2);
SendClientMessage(playerid, GELB, string3);
SendClientMessage(playerid, GELB, string4);
SendClientMessage(playerid, GELB, "Du kannst per /aw [ID] antworten");
format(mitteilung, sizeof(mitteilung), "[SUPPORT] %s hat dein Support Ticket geöffnet. Du kannst nun per /sup direkt mit ihm schreiben!",DerAdmin);
new string5[128];
format(string5, sizeof (string5), "[SUPPORT] %s hat das Ticket von %s geöffnet");
SendAdminMessage(COLOR_YELLOW, string5);
SendClientMessage(pID, GELB, mitteilung);
DeinSupport[pID] = playerid;
TicketAngenommen[pID] = 1;
}
}
return 1;
}
{
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, GRAU,"[Benutzung]: /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))
{
if(pInfo[playerid][admin] >= 1)
{
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 schrieb folgende Supportnachricht:", DerPlayer);
SendClientMessage(playerid, GELB, string);
SendClientMessage(playerid, GELB, string2);
SendClientMessage(playerid, GELB, string3);
SendClientMessage(playerid, GELB, string4);
SendClientMessage(playerid, GELB, "Du kannst per /aw [ID] antworten");
format(mitteilung, sizeof(mitteilung), "[SUPPORT] %s hat dein Support Ticket geöffnet. Du kannst nun per /sup direkt mit ihm schreiben!",DerAdmin);
new string5[128];
format(string5, sizeof (string5), "[SUPPORT] %s hat das Ticket von %s geöffnet");
SendAdminMessage(COLOR_YELLOW, string5);
SendClientMessage(pID, GELB, mitteilung);
DeinSupport[pID] = playerid;
TicketAngenommen[pID] = 1;
}
}
return 1;
}
//---------------------------------------------------------------------------------
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;
}
{
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;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
for(new i = 0; i<(sizeof(lspdcars)); i++)
{
if(GetPlayerVehicleID(playerid) == lspdcars[i])
{
if(IstSpielerInFraktion(playerid, 1))
if(IstSpielerInFraktion(playerid, 2))
if(IstSpielerInFraktion(playerid, 3))
if(IstSpielerInFraktion(playerid, 4))
if(IstSpielerInFraktion(playerid, 5))
{
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,GRAU,"Du bist kein Mitglied des LSPD/FBI/Army/SWAT");
}
}
}
}
if(newstate == PLAYER_STATE_DRIVER)
{
for(new i = 0; i<(sizeof(fbicars)); i++)
{
if(GetPlayerVehicleID(playerid) == fbicars[i])
{
if(IstSpielerInFraktion(playerid, 2))
{
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,GRAU,"Du bist kein Agent!");
}
}
}
}
return 1;
}
{
if(newstate == PLAYER_STATE_DRIVER)
{
for(new i = 0; i<(sizeof(lspdcars)); i++)
{
if(GetPlayerVehicleID(playerid) == lspdcars[i])
{
if(IstSpielerInFraktion(playerid, 1))
if(IstSpielerInFraktion(playerid, 2))
if(IstSpielerInFraktion(playerid, 3))
if(IstSpielerInFraktion(playerid, 4))
if(IstSpielerInFraktion(playerid, 5))
{
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,GRAU,"Du bist kein Mitglied des LSPD/FBI/Army/SWAT");
}
}
}
}
if(newstate == PLAYER_STATE_DRIVER)
{
for(new i = 0; i<(sizeof(fbicars)); i++)
{
if(GetPlayerVehicleID(playerid) == fbicars[i])
{
if(IstSpielerInFraktion(playerid, 2))
{
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,GRAU,"Du bist kein Agent!");
}
}
}
}
return 1;
}
Error´s:
C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\Towelie.pwn(1051) : error 017: undefined symbol "sSPieler"
C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\Towelie.pwn(1051) : warning 215: expression has no effect
C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\Towelie.pwn(1051) : error 001: expected token: ";", but found "]"
C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\Towelie.pwn(1051) : error 029: invalid expression, assumed zero
C:\Users\Sinan\Desktop\SAMP SERVER2\gamemodes\Towelie.pwn(1051) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.