Hi, immer wird die Nachricht gesendet Benutze: /setfrak usw... doch weiß ich nicht warum. Ich gebe alles normal ein. Hier ist das Script vielleicht liegt es ja daran und ich bin zu blöd den Fehler zu finden.
if (strcmp("/setfrak", cmdtext, true, 8) == 0)
{
if(mysql_GetInt("accounts", "Adminlevel", "Name", pInfo[playerid][pName]) == 0)
{
SendClientMessage(playerid, COLOR_RED, "Du bist kein Admin!");
}
else if(mysql_GetInt("accounts", "Adminlevel", "Name", pInfo[playerid][pName]) == 1 || mysql_GetInt("accounts", "Adminlevel", "Name", pInfo[playerid][pName]) == 2 || mysql_GetInt("accounts", "Adminlevel", "Name", pInfo[playerid][pName]) == 3 || mysql_GetInt("accounts", "Adminlevel", "Name", pInfo[playerid][pName]) == 4)
{
SendClientMessage(playerid, COLOR_RED, "Dein Adminlevel reicht nicht aus!");
}
else if(mysql_GetInt("accounts", "Adminlevel", "Name", pInfo[playerid][pName]) == 5)
{
if(mysql_GetInt("accounts", "Aduty", "Name", pInfo[playerid][pName]) == 1)
{
if(FrakAccept[playerid] == 1) { SendClientMessage(playerid, COLOR_RED, "Der Spieler hat schon eine Einladung."); }
new pID,//Anderer Spieler
pIDn[MAX_PLAYER_NAME],//Name des anderen Spielers
pIDN[128],//Nachricht FÜR den anderen Spieler
adminn[MAX_PLAYER_NAME],//Admin Name
adminN[128],//Nachrich FÜR den Admin
Frak,
Fn[15];//Die Frkationsid in der der Spieler gehen soll
if(sscanf(params, "ui", pID, Frak))return SendClientMessage(playerid, COLOR_RED, "Benutze: /setfrak [playerid] [fraktionsid] ! Eine Liste der Fraktionen findest du unter /fraktionen !");
GetPlayerName(playerid, adminn, sizeof(adminn));
GetPlayerName(pID, pIDn, sizeof(pIDn));
if(Frak != 0)
{
if(Frak == 0) {Fn = "Zivilist", SetPlayerSkin(pID, 1);}
else if(Frak == 1) {Fn = "Polizist", SetPlayerSkin(pID, 280);}
else if(Frak == 2) {Fn = "Medic", SetPlayerSkin(playerid, 276);}
else if(Frak == 3) {Fn = "Army", SetPlayerSkin(playerid, 287);}
else if(Frak == 4) {Fn = "FBI", SetPlayerSkin(playerid, 156);}
else if(Frak == 5) {Fn = "GS", SetPlayerSkin(playerid, 105);}
else if(Frak == 6) {Fn = "Ballas", SetPlayerSkin(playerid, 102);}
else if(Frak == 7) {Fn = "Vagos", SetPlayerSkin(playerid, 108);}
else if(Frak == 8) {Fn = "Da Nang Boys", SetPlayerSkin(playerid, 121);}
else if(Frak == 9) {Fn = "Hitman", SetPlayerSkin(playerid, 111);}
else if(Frak == 10) {Fn = "Yakuza", SetPlayerSkin(playerid, 117);}
else if(Frak == 11) {Fn = "Hells Angels", SetPlayerSkin(playerid, 247);}
else if(Frak == 12) {Fn = "La Cosa Nostra", SetPlayerSkin(playerid, 247);}
else if(Frak == 13) {Fn = "Terror", SetPlayerSkin(playerid, 114);}
else if(Frak == 14) {Fn = "San News", SetPlayerSkin(playerid, 141);}
else if(Frak == 15) {Fn = "Fahrschule", SetPlayerSkin(playerid, 147);}
else if(Frak == 16) {Fn = "Staat", SetPlayerSkin(playerid, 187);}
format(adminN, sizeof(adminN), "Du hast" HEX_RED"%s" HEX_BLUE"gefragt ob er in die Fraktion" HEX_RED"'%s'" HEX_BLUE"gehen möchte!", pIDn, Frak);
format(pIDN, sizeof(pIDN), "Du wurdest von " HEX_RED"%s" HEX_BLUE"gefragt ob du in die Fraktion" HEX_RED"'%s'" HEX_BLUE"gehen möchtest! Benutze" HEX_RED"Accept" HEX_BLUE"um anzunehmen oder" HEX_RED"NAccept" HEX_BLUE" um abzulehnen !", adminn, Frak);
SendClientMessage(playerid, COLOR_BLUE, adminN);
SendClientMessage(playerid, COLOR_BLUE, pIDN);
TogglePlayerControllable(pID, false);
mysql_SetInt("accounts", "Fraktions Rang", 1, "Name", pInfo[pID][pName]);
FrakAccept[playerid] = 1;
SetFrak[playerid] = Frak;
}
else if(Frak == 0)
{
gTeam[pID] = TEAM_ZIVI;
mysql_SetInt("accounts", "Fraktion", Frak, "Name", pInfo[pID][pName]);
mysql_SetInt("accounts", "Fraktions Rang", 1, "Name", pInfo[pID][pName]);
SpawnPlayer(pID);
SendClientMessage(playerid, COLOR_BLUE, "Erfolgreich !");
SendClientMessage(pID, COLOR_BLUE, "Du wudest zum Zivi gemacht.");
}
}
}
}