Hey Hey,
Ich habe meinen Befehl /ah als Dialog gescriptet doch nun frag ich mich wie kann ich das Machen das Wenn der User Kein admin ist, oder nicht für z.B Moderator ausreichend Rechte hat, das Da kommt "Du bist kein Admin"
und sich das AH System schließt.
if(dialogid == DIALOG_AH)
{
if(response == 0)
{
SendClientMessage(playerid,ROT,"Du hast das Admin Help system Verlassen!");
return 1;
}
if(listitem == 0)
{
ShowPlayerDialog(playerid,DIALOG_AH,DIALOG_STYLE_MSGBOX,"Supporter","Folgt","ok","ok");
if(IstSpielerAdmin(playerid,0))return SendClientMessage(playerid,ROT,"Du bist kein Admin!");
return 1;
}
if(listitem == 1)
{
ShowPlayerDialog(playerid,DIALOG_AH,DIALOG_STYLE_MSGBOX,"Moderator","Folgt","ok","ok");
return 1;
}
if(listitem == 2)
{
ShowPlayerDialog(playerid,DIALOG_AH,DIALOG_STYLE_MSGBOX,"Support Admin 3","Folgt","ok","ok");
return 1;
}
if(listitem == 3)
{
ShowPlayerDialog(playerid,DIALOG_AH,DIALOG_STYLE_MSGBOX,"Support Admin 4","Folgt","ok","ok");
return 1;
}
if(listitem == 4)
{
ShowPlayerDialog(playerid,DIALOG_AH,DIALOG_STYLE_MSGBOX,"Support Admin 5","Folgt","ok","ok");
return 1;
}
if(listitem == 5)
{
ShowPlayerDialog(playerid,DIALOG_AH,DIALOG_STYLE_MSGBOX,"1337 Administrator","Folgt","ok","ok");
return 1;
}
if(listitem == 6)
{
ShowPlayerDialog(playerid,DIALOG_AH,DIALOG_STYLE_MSGBOX,"Projektleitung","Folgt","ok","ok");
}
[/pwn]
if (strcmp("/ah", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid,DIALOG_AH,DIALOG_STYLE_LIST,"Admin Help","Supporter\nModerator\nSupport Admin 3\nSupport Admin 4\nSupport Admin 5\n1337 Administrator\nProjektleitung","Ok","Abbrechen");
if(IstSpielerAdmin(playerid,0))return SendClientMessage(playerid,ROT,"Du bist kein Admin!");
return 1;
}