20.02.2013, 16:31
Hi,
I'm trying to redo my /ahelp command in this way:
and it works IG if you are VIP but not if you are admin 1 or more, it says "SERVER: Unknow Command". Then all my commands stop working, showing text "SERVER: Unknow Command"..
Thanks in advance
I'm trying to redo my /ahelp command in this way:
pawn Код:
if (strcmp("/ah", cmdtext, true) == 0)
{
new CmdVIP [ 1024 ];
CmdVIP = "Commands VIP: \n";
strcat(CmdVIP, "line 1 \n");
strcat(CmdVIP, "line 2 \n");
new CmdAdmin1 [ 1024 ];
CmdAdmin1 = "Commands Admin 1: \n";
strcat(CmdAdmin1, "line 1 \n");
strcat(CmdAdmin1, "line 2 \n");
// etc..
if(PlayerInfo[playerid][pDonateRank] > 0 && PlayerInfo[playerid][pAdmin] == 0)
{
ShowPlayerDialog(playerid,5685,DIALOG_STYLE_MSGBOX,"Admin Help",CmdMdc,"Close","");
return 1;
}
else if (PlayerInfo[playerid][pAdmin] == 1)
{
new AdminHelpDialog[1024 ];
format(AdminHelpDialog,sizeof(AdminHelpDialog),"\n%s%s",CmdVIP,CmdAdmin1);
ShowPlayerDialog(playerid,5685,DIALOG_STYLE_MSGBOX,"Admin Help",AdminHelpDialog,"Close","");
return 1;
}
// etc..
}
Thanks in advance