Hey ich habe versucht ein Aduty system in mein Script zu formatieren nur es erscheinen die fehler...
Zeile (4328) : Unbekannte Variable : "Administrator"
Zeile (4328) : Befehl hat keinen Sinn
Zeile (4328) : Erwartete Zeichen ";", aber gefunden "]"
Zeile (4328) : Ungültiger Befehl
Zeile (4328) : Zuviele Fehler in einer Zeile
Script:
if (strcmp(cmd, "/adminduty", true) == 0 || strcmp(cmd, "/aduty", true) == 0)
{
if(AdminDuty[playerid] == 0)
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
SendClientMessage(playerid,COLOR_YELLOW,"Du bist nun als Test-Supporter im Dienst!");
SetPlayerColor(playerid,COLOR_GOLD);
AdminDuty[playerid] = 1;
Mod[playerid] = Create3DTextLabel("*Test-Supporter on Duty*",COLOR_GOLD,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Mod[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"* Test-Supporter %s[ID:%d] ist nun im Dienst [Er ist Gold markiert]*",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
SetPlayerHealth(playerid, 0x7F800000);
SetPlayerArmour(playerid, 100);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] == 2)
{
SendClientMessage(playerid,COLOR_YELLOW,"Du bist nun als Supporter im Dienst!");
SetPlayerColor(playerid,COLOR_GOLD);
AdminDuty[playerid] = 1;
Mod[playerid] = Create3DTextLabel("*Supporter on Duty*",COLOR_GOLD,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Mod[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"* Supporter %s[ID:%d] ist nun im Dienst [Er ist Gold markiert]*",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
SetPlayerHealth(playerid, 0x7F800000);
SetPlayerArmour(playerid, 100);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] == 3)
{
SendClientMessage(playerid,COLOR_YELLOW,"Du bist nun als Moderator im Dienst!");
SetPlayerColor(playerid,COLOR_GOLD);
AdminDuty[playerid] = 1;
Supermod[playerid] = Create3DTextLabel("*Moderator on Duty*",COLOR_GOLD,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Supermod[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"*Moderator %s[ID:%d] ist nun im Dienst [Er ist Gold markiert]*",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
SetPlayerHealth(playerid, 0x7F800000);
SetPlayerArmour(playerid, 100);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] ==4)
{
SendClientMessage(playerid,COLOR_YELLOW,"Du bist nun als Administrator im Dienst!");
SetPlayerColor(playerid,COLOR_GOLD);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("*Administrator on Duty*",COLOR_GOLD,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"Administrator %s[ID:%d] ist nun im Dienst [Er ist Gold markiert]*",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
SetPlayerArmour(playerid, 100);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] ==5)
{
SendClientMessage(playerid,COLOR_YELLOW,"Du bist nun als Full Admin im Dienst!");
SetPlayerColor(playerid,COLOR_GOLD);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("*Full Admin on Duty*",COLOR_GOLD,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"Full Admin %s[ID:%d] ist nun im Dienst [Er ist Gold markiert]*",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
SetPlayerArmour(playerid, 100);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] ==6)
{
SendClientMessage(playerid,COLOR_YELLOW,"Du bist nun als Teamleiter im Dienst!");
SetPlayerColor(playerid,COLOR_GOLD);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("*Teamleiter on Duty*",COLOR_GOLD,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"Teamleiter %s[ID:%d] ist nun im Dienst [Er ist Gold markiert]*",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
SetPlayerArmour(playerid, 100);
return 1;
}
else if(PlayerInfo[playerid][pAdmin] ==7)
{
SendClientMessage(playerid,COLOR_YELLOW,"Projektleiter im Dienst!");
SetPlayerColor(playerid,COLOR_GOLD);
AdminDuty[playerid] = 1;
Admin[playerid] = Create3DTextLabel("*Projektleiter on Duty*",COLOR_GOLD,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"Projektleiter %s[ID:%d] ist nun im Dienst [Er ist Gold markiert]*",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
SetPlayerArmour(playerid, 100);
return 1;
}
}
if(AdminDuty[playerid] == 1)
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
format(string,sizeof(string),"Test-Supporter %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
}
if(PlayerInfo[playerid][pAdmin] == 2)
{
format(string,sizeof(string),"Supporter %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
}
else if(PlayerInfo[playerid][pAdmin] == 3)
{
format(string,sizeof(string),"Moderator %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
}
else if(PlayerInfo[playerid][pAdmin] >=4)
{
format(string,sizeof(string),"Administrator %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
}
else if(PlayerInfo[playerid][pAdmin] >=5)
{
format(string,sizeof(string),"Full Admin %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
}
else if(PlayerInfo[playerid][pAdmin] >=6)
{
format(string,sizeof(string),"Teamleiter %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
}
else if(PlayerInfo[playerid][pAdmin] >=7)
{
format(string,sizeof(string),"Projektleiter %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
SendClientMessageToAll(COLOR_GOLD, string);
}
SendClientMessage(playerid,COLOR_YELLOW,"Du bist nun nichtmehr On Duty!");
Delete3DTextLabel(Admin[playerid]);
Delete3DTextLabel(Supermod[playerid]);
Delete3DTextLabel(Mod[playerid]);
Delete3DTextLabel(Supporter[playerid]);
Delete3DTextLabel(Admin[playerid]);
Delete3DTextLabel(Supermod[playerid]);
Delete3DTextLabel(Mod[playerid]);
Delete3DTextLabel(Supporter[playerid]);
SetPlayerArmour(playerid, 0);
AdminDuty[playerid] = 0;
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
SetPlayerColor(playerid, NAMECOLOR_LSCOP);
}
else
{
SetPlayerColor(playerid,TEAM_HIT_COLOR);
}
}
return 1;
}
return 1;
}
Und unter OnPlayerDisconnect:
if(AdminDuty[playerid] == 1)
{
Delete3DTextLabel(Admin[playerid]);
Delete3DTextLabel(Supermod[playerid]);
Delete3DTextLabel(Mod[playerid]);
Delete3DTextLabel(Supporter[playerid]);
Delete3DTextLabel(Admin[playerid]);
Delete3DTextLabel(Supermod[playerid]);
Delete3DTextLabel(Mod[playerid]);
Delete3DTextLabel(Supporter[playerid]);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
AdminDuty[playerid] = 0;
}
Ich hoffe einer könnte mir weiterhelfen..