dcmd(acmd1, 9, cmdtext); //this is in the OnPlayerCommandText
dcmd_acmd1(playerid,params[]){
#pragma unused params
if(Account[playerid][pAdminlevel]>=1){
SendClientMessage(playerid, COLOR_ZADMINBLUE, LanguageText[149]);
SendClientMessage(playerid, COLOR_WHITE, "/asay /announce | # [text] (it's private admin chat!) /acmd2 /admincolor /playersrecord /defultsetting");
SendClientMessage(playerid, COLOR_WHITE, "/muted /freezed /jailed /makevip /removevip /savepersonalcar /replacepersonalcar");
SendClientMessage(playerid, COLOR_WHITE, "/veh /fix /fixpv /flip /givecar /heal /jetp /armour /mute /unmute /jail /unjail /disarm /removeweapon /reset /warn");
SendClientMessage(playerid, COLOR_WHITE, "/setweather /settime /carcolor /getip /getvhealth /setvhealth /eject /burn /crash /teleplayer /setname /banwarn");
SendClientMessage(playerid, COLOR_WHITE, "/die /lock /unlock /god /sgod /get /goto /vget /vgoto /setskin /setskintome /setscore /kick /ban /rangeban /freeze");
SendClientMessage(playerid, COLOR_WHITE, "/unfreeze /slap /explode /spec /specoff /givemoney /setplayerinterior /cchat /reports /reportsoff /gmx /lock");
SendClientMessage(playerid, COLOR_WHITE, "/setplayerweather /setplayertime /tempAdmin /makeadmin /playerdata /makeaccount /renameaccount /deleteaccount");
SendClientMessage(playerid, COLOR_YELLOW, LanguageText[150]);
SendClientMessage(playerid, COLOR_LIGHTRED, "***************************************************************************");}
return 1;}
dcmd(acmd2, 9, cmdtext); //this is in the OnPlayerCommandText
dcmd_acmd2(playerid,params[]){
#pragma unused params
if(Account[playerid][pAdminlevel]>=1){
SendClientMessage(playerid, COLOR_ZADMINBLUE, LanguageText[152]);
SendClientMessage(playerid, COLOR_WHITE, "/aheal /aarmour/amute /aunmute /ajail /aunjail /agivemoney /adie /adisarm /areset");
SendClientMessage(playerid, COLOR_WHITE, "/aexplode /akick /aban /afreeze /aunfreeze /aslap /aget /agoto /asetweather /asettime");
SendClientMessage(playerid, COLOR_LIGHTRED, "***************************************************************************");}
return 1;}
dcmd(acmd1, 9, cmdtext); //this is in the OnPlayerCommandText
public OnPlayerCommandText(playerid, cmdtext[]) {
if (acmd1(playerid, cmdtext)) return 1;
if (acmd2(playerid, cmdtext)) return 1;
return 0;
}
acmd1(playerid,params[]){
#pragma unused params
if(Account[playerid][pAdminlevel]>=1){
SendClientMessage(playerid, COLOR_ZADMINBLUE, LanguageText[149]);
SendClientMessage(playerid, COLOR_WHITE, "/asay /announce | # [text] (it's private admin chat!) /acmd2 /admincolor /playersrecord /defultsetting");
SendClientMessage(playerid, COLOR_WHITE, "/muted /freezed /jailed /makevip /removevip /savepersonalcar /replacepersonalcar");
SendClientMessage(playerid, COLOR_WHITE, "/veh /fix /fixpv /flip /givecar /heal /jetp /armour /mute /unmute /jail /unjail /disarm /removeweapon /reset /warn");
SendClientMessage(playerid, COLOR_WHITE, "/setweather /settime /carcolor /getip /getvhealth /setvhealth /eject /burn /crash /teleplayer /setname /banwarn");
SendClientMessage(playerid, COLOR_WHITE, "/die /lock /unlock /god /sgod /get /goto /vget /vgoto /setskin /setskintome /setscore /kick /ban /rangeban /freeze");
SendClientMessage(playerid, COLOR_WHITE, "/unfreeze /slap /explode /spec /specoff /givemoney /setplayerinterior /cchat /reports /reportsoff /gmx /lock");
SendClientMessage(playerid, COLOR_WHITE, "/setplayerweather /setplayertime /tempAdmin /makeadmin /playerdata /makeaccount /renameaccount /deleteaccount");
SendClientMessage(playerid, COLOR_YELLOW, LanguageText[150]);
SendClientMessage(playerid, COLOR_LIGHTRED, "***************************************************************************");
return 1;
}
return 0;
}
acmd2(playerid,params[]){
#pragma unused params
if(Account[playerid][pAdminlevel]>=1){
SendClientMessage(playerid, COLOR_ZADMINBLUE, LanguageText[152]);
SendClientMessage(playerid, COLOR_WHITE, "/aheal /aarmour/amute /aunmute /ajail /aunjail /agivemoney /adie /adisarm /areset");
SendClientMessage(playerid, COLOR_WHITE, "/aexplode /akick /aban /afreeze /aunfreeze /aslap /aget /agoto /asetweather /asettime");
SendClientMessage(playerid, COLOR_LIGHTRED, "***************************************************************************");
return 1;
}
return 0;
}
//add this to your define
#define SD ShowPlayerDialog
#define DM DIALOG_STYLE_MSGBOX
#define DIALOG_BEGIN 905
//==========================adminhelp=======================================//
dcmd_acmds(playerid,params[]){
new string[1246+200];
if(Account[playerid][pAdminlevel]>=1){
strcat(string, ""orange"");
strcat(string, "Listing all available administrative commands for your admin level.\n\n");
strcat(string, "/asay /announce | # [text] (it's private admin chat!) /acmd2 /admincolor /playersrecord /defultsetting\n");
strcat(string, ""grey"");
strcat(string, "/muted /freezed /jailed /makevip /removevip /savepersonalcar /replacepersonalcarl\n");
strcat(string, "/veh /fix /fixpv /flip /givecar /heal /jetp /armour /mute /unmute /jail /unjail /disarm /removeweapon /reset /warn\n");
strcat(string, "/setweather /settime /carcolor /getip /getvhealth /setvhealth /eject /burn /crash /teleplayer /setname /banwarn\n\n");
strcat(string, "/die /lock /unlock /god /sgod /get /goto /vget /vgoto /setskin /setskintome /setscore /kick /ban /rangeban /freeze\n\n");
strcat(string, "/unfreeze /slap /explode /spec /specoff /givemoney /setplayerinterior /cchat /reports /reportsoff /gmx /lock\n\n");
strcat(string, "/setplayerweather /setplayertime /tempAdmin /makeadmin /playerdata /makeaccount /renameaccount /deleteaccount\n\n");
strcat(string, "/aheal /aarmour/amute /aunmute /ajail /aunjail /agivemoney /adie /adisarm /areset\n\n");
strcat(string, "/aexplode /akick /aban /afreeze /aunfreeze /aslap /aget /agoto /asetweather /asettime\n\n");
SD(playerid, DIALOG_BEGIN, DM, ""orange"Administrative Commands", string, "Close", "");
return 1;
}
have you try my script ? just try it and send error logs to me
|
public OnPlayerCommandText(playerid, cmdtext[]) {
if (acmd1(playerid, cmdtext)) return 1;
if (acmd2(playerid, cmdtext)) return 1;
return 0;
}
acmd1(playerid,params[]){
#pragma unused params
if(Account[playerid][pAdminlevel]>=1){
SendClientMessage(playerid, COLOR_ZADMINBLUE, LanguageText[149]);
SendClientMessage(playerid, COLOR_WHITE, "/asay /announce | # [text] (it's private admin chat!) /acmd2 /admincolor /playersrecord /defultsetting");
SendClientMessage(playerid, COLOR_WHITE, "/muted /freezed /jailed /makevip /removevip /savepersonalcar /replacepersonalcar");
SendClientMessage(playerid, COLOR_WHITE, "/veh /fix /fixpv /flip /givecar /heal /jetp /armour /mute /unmute /jail /unjail /disarm /removeweapon /reset /warn");
SendClientMessage(playerid, COLOR_WHITE, "/setweather /settime /carcolor /getip /getvhealth /setvhealth /eject /burn /crash /teleplayer /setname /banwarn");
SendClientMessage(playerid, COLOR_WHITE, "/die /lock /unlock /god /sgod /get /goto /vget /vgoto /setskin /setskintome /setscore /kick /ban /rangeban /freeze");
SendClientMessage(playerid, COLOR_WHITE, "/unfreeze /slap /explode /spec /specoff /givemoney /setplayerinterior /cchat /reports /reportsoff /gmx /lock");
SendClientMessage(playerid, COLOR_WHITE, "/setplayerweather /setplayertime /tempAdmin /makeadmin /playerdata /makeaccount /renameaccount /deleteaccount");
SendClientMessage(playerid, COLOR_YELLOW, LanguageText[150]);
SendClientMessage(playerid, COLOR_LIGHTRED, "***************************************************************************");
return 1;
}
return 0;
}
acmd2(playerid,params[]){
#pragma unused params
if(Account[playerid][pAdminlevel]>=1){
SendClientMessage(playerid, COLOR_ZADMINBLUE, LanguageText[152]);
SendClientMessage(playerid, COLOR_WHITE, "/aheal /aarmour/amute /aunmute /ajail /aunjail /agivemoney /adie /adisarm /areset");
SendClientMessage(playerid, COLOR_WHITE, "/aexplode /akick /aban /afreeze /aunfreeze /aslap /aget /agoto /asetweather /asettime");
SendClientMessage(playerid, COLOR_LIGHTRED, "***************************************************************************");
return 1;
}
return 0;
}
for someone to fix it?
You checked my example? PHP код:
|
error 017: undefined symbol "dcmd_acmd1" error 017: undefined symbol "dcmd_acmd2"
public OnPlayerCommandText(playerid, cmdtext[]) {
if (acmd1(playerid, cmdtext)) return 1;
if (acmd2(playerid, cmdtext)) return 1;
return 0;
}
acmd1(playerid,params[]){
#pragma unused params
if(Account[playerid][pAdminlevel]>=1){
SendClientMessage(playerid, COLOR_ZADMINBLUE, LanguageText[149]);
SendClientMessage(playerid, COLOR_WHITE, "/asay /announce | # [text] (it's private admin chat!) /acmd2 /admincolor /playersrecord /defultsetting");
SendClientMessage(playerid, COLOR_WHITE, "/muted /freezed /jailed /makevip /removevip /savepersonalcar /replacepersonalcar");
SendClientMessage(playerid, COLOR_WHITE, "/veh /fix /fixpv /flip /givecar /heal /jetp /armour /mute /unmute /jail /unjail /disarm /removeweapon /reset /warn");
SendClientMessage(playerid, COLOR_WHITE, "/setweather /settime /carcolor /getip /getvhealth /setvhealth /eject /burn /crash /teleplayer /setname /banwarn");
SendClientMessage(playerid, COLOR_WHITE, "/die /lock /unlock /god /sgod /get /goto /vget /vgoto /setskin /setskintome /setscore /kick /ban /rangeban /freeze");
SendClientMessage(playerid, COLOR_WHITE, "/unfreeze /slap /explode /spec /specoff /givemoney /setplayerinterior /cchat /reports /reportsoff /gmx /lock");
SendClientMessage(playerid, COLOR_WHITE, "/setplayerweather /setplayertime /tempAdmin /makeadmin /playerdata /makeaccount /renameaccount /deleteaccount");
SendClientMessage(playerid, COLOR_YELLOW, LanguageText[150]);
SendClientMessage(playerid, COLOR_LIGHTRED, "***************************************************************************");
return 1;
}
return 0;
}
acmd2(playerid,params[]){
#pragma unused params
if(Account[playerid][pAdminlevel]>=1){
SendClientMessage(playerid, COLOR_ZADMINBLUE, LanguageText[152]);
SendClientMessage(playerid, COLOR_WHITE, "/aheal /aarmour/amute /aunmute /ajail /aunjail /agivemoney /adie /adisarm /areset");
SendClientMessage(playerid, COLOR_WHITE, "/aexplode /akick /aban /afreeze /aunfreeze /aslap /aget /agoto /asetweather /asettime");
SendClientMessage(playerid, COLOR_LIGHTRED, "***************************************************************************");
return 1;
}
return 0;
}