SA-MP Forums Archive
Zadmin acmd1 & acmd2 commands not working in server - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Zadmin acmd1 & acmd2 commands not working in server (/showthread.php?tid=588243)



Zadmin acmd1 & acmd2 commands not working in server - brandypol - 06.09.2015

Hi guys I added the Zadmin filterscript to my server and when I tried to use the commands, there were two of them that didn't work. The /acmd1 and the /amcd2 commands. Those commands are supposed to show the admin commands panels but the panels don't show when we type the commands. Here's the script lines for the two commands :

/acdm1


PHP код:
dcmd(acmd19cmdtext); //this is in the OnPlayerCommandText
dcmd_acmd1(playerid,params[]){
  
#pragma unused params
  
if(Account[playerid][pAdminlevel]>=1){
    
SendClientMessage(playeridCOLOR_ZADMINBLUELanguageText[149]);
    
SendClientMessage(playeridCOLOR_WHITE"/asay /announce  |  # [text] (it's private admin chat!)  /acmd2 /admincolor /playersrecord /defultsetting");
    
SendClientMessage(playeridCOLOR_WHITE"/muted /freezed /jailed /makevip /removevip /savepersonalcar /replacepersonalcar");
    
SendClientMessage(playeridCOLOR_WHITE"/veh /fix /fixpv /flip /givecar /heal /jetp /armour /mute /unmute /jail /unjail /disarm /removeweapon /reset /warn");
    
SendClientMessage(playeridCOLOR_WHITE"/setweather /settime /carcolor /getip /getvhealth /setvhealth /eject /burn /crash /teleplayer /setname /banwarn");
    
SendClientMessage(playeridCOLOR_WHITE"/die /lock /unlock /god /sgod /get /goto /vget /vgoto /setskin /setskintome /setscore /kick /ban /rangeban /freeze");
    
SendClientMessage(playeridCOLOR_WHITE"/unfreeze /slap /explode /spec /specoff /givemoney /setplayerinterior /cchat /reports /reportsoff /gmx /lock");
    
SendClientMessage(playeridCOLOR_WHITE"/setplayerweather /setplayertime /tempAdmin /makeadmin /playerdata /makeaccount /renameaccount /deleteaccount");
    
SendClientMessage(playeridCOLOR_YELLOWLanguageText[150]);
    
SendClientMessage(playeridCOLOR_LIGHTRED"***************************************************************************");}
  return 
1;} 
/acmd2
PHP код:
dcmd(acmd29cmdtext); //this is in the OnPlayerCommandText
dcmd_acmd2(playerid,params[]){
  
#pragma unused params
  
if(Account[playerid][pAdminlevel]>=1){
    
SendClientMessage(playeridCOLOR_ZADMINBLUELanguageText[152]);
    
SendClientMessage(playeridCOLOR_WHITE"/aheal /aarmour/amute /aunmute /ajail /aunjail /agivemoney /adie /adisarm /areset");
    
SendClientMessage(playeridCOLOR_WHITE"/aexplode /akick /aban /afreeze /aunfreeze /aslap /aget /agoto /asetweather /asettime");
    
SendClientMessage(playeridCOLOR_LIGHTRED"***************************************************************************");}
  return 
1;} 



Re: Zadmin acmd1 & acmd2 commands not working in server - Logofero - 06.09.2015

PHP код:
dcmd(acmd19cmdtext); //this is in the OnPlayerCommandText 
It's something in between zcmd and OnPlayerCommandText?

PHP код:
public OnPlayerCommandText(playeridcmdtext[]) {
     if (
acmd1(playeridcmdtext)) return 1;
     if (
acmd2(playeridcmdtext)) return 1;
     return 
0;
}
acmd1(playerid,params[]){
  
#pragma unused params
  
if(Account[playerid][pAdminlevel]>=1){
    
SendClientMessage(playeridCOLOR_ZADMINBLUELanguageText[149]);
    
SendClientMessage(playeridCOLOR_WHITE"/asay /announce  |  # [text] (it's private admin chat!)  /acmd2 /admincolor /playersrecord /defultsetting");
    
SendClientMessage(playeridCOLOR_WHITE"/muted /freezed /jailed /makevip /removevip /savepersonalcar /replacepersonalcar");
    
SendClientMessage(playeridCOLOR_WHITE"/veh /fix /fixpv /flip /givecar /heal /jetp /armour /mute /unmute /jail /unjail /disarm /removeweapon /reset /warn");
    
SendClientMessage(playeridCOLOR_WHITE"/setweather /settime /carcolor /getip /getvhealth /setvhealth /eject /burn /crash /teleplayer /setname /banwarn");
    
SendClientMessage(playeridCOLOR_WHITE"/die /lock /unlock /god /sgod /get /goto /vget /vgoto /setskin /setskintome /setscore /kick /ban /rangeban /freeze");
    
SendClientMessage(playeridCOLOR_WHITE"/unfreeze /slap /explode /spec /specoff /givemoney /setplayerinterior /cchat /reports /reportsoff /gmx /lock");
    
SendClientMessage(playeridCOLOR_WHITE"/setplayerweather /setplayertime /tempAdmin /makeadmin /playerdata /makeaccount /renameaccount /deleteaccount");
    
SendClientMessage(playeridCOLOR_YELLOWLanguageText[150]);
    
SendClientMessage(playeridCOLOR_LIGHTRED"***************************************************************************");
     return 
1;
  }
  return 
0;

acmd2(playerid,params[]){
  
#pragma unused params
  
if(Account[playerid][pAdminlevel]>=1){
    
SendClientMessage(playeridCOLOR_ZADMINBLUELanguageText[152]);
    
SendClientMessage(playeridCOLOR_WHITE"/aheal /aarmour/amute /aunmute /ajail /aunjail /agivemoney /adie /adisarm /areset");
    
SendClientMessage(playeridCOLOR_WHITE"/aexplode /akick /aban /afreeze /aunfreeze /aslap /aget /agoto /asetweather /asettime");
    
SendClientMessage(playeridCOLOR_LIGHTRED"***************************************************************************");
    return 
1;
  }
  return 
0;




Re: Zadmin acmd1 & acmd2 commands not working in server - AlexandreAymanito - 06.09.2015

lets make it Dialog is better

PHP код:
//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(playeridDIALOG_BEGINDM""orange"Administrative Commands"string"Close""");
    return 
1;




Re: Zadmin acmd1 & acmd2 commands not working in server - brandypol - 06.09.2015

Ok but now I got those errors what do I havce to do ?

error 017: undefined symbol "dcmd_acmd1"
error 017: undefined symbol "dcmd_acmd2"


Re: Zadmin acmd1 & acmd2 commands not working in server - brandypol - 06.09.2015

Please help me I'm not a really good scripter :/


Re: Zadmin acmd1 & acmd2 commands not working in server - AlexandreAymanito - 06.09.2015

have you try my script ? just try it and send error logs to me


Re: Zadmin acmd1 & acmd2 commands not working in server - brandypol - 06.09.2015

Quote:
Originally Posted by AlexandreAymanito
Посмотреть сообщение
have you try my script ? just try it and send error logs to me
your script doesnt work at all dude but thanks for the help


Re: Zadmin acmd1 & acmd2 commands not working in server - Logofero - 06.09.2015

Quote:
Originally Posted by brandypol
Посмотреть сообщение
Please help me I'm not a really good scripter :/
for someone to fix it?
You checked my example?

PHP код:
public OnPlayerCommandText(playeridcmdtext[]) {
     if (
acmd1(playeridcmdtext)) return 1;
     if (
acmd2(playeridcmdtext)) return 1;
     return 
0;
}
acmd1(playerid,params[]){
  
#pragma unused params
  
if(Account[playerid][pAdminlevel]>=1){
    
SendClientMessage(playeridCOLOR_ZADMINBLUELanguageText[149]);
    
SendClientMessage(playeridCOLOR_WHITE"/asay /announce  |  # [text] (it's private admin chat!)  /acmd2 /admincolor /playersrecord /defultsetting");
    
SendClientMessage(playeridCOLOR_WHITE"/muted /freezed /jailed /makevip /removevip /savepersonalcar /replacepersonalcar");
    
SendClientMessage(playeridCOLOR_WHITE"/veh /fix /fixpv /flip /givecar /heal /jetp /armour /mute /unmute /jail /unjail /disarm /removeweapon /reset /warn");
    
SendClientMessage(playeridCOLOR_WHITE"/setweather /settime /carcolor /getip /getvhealth /setvhealth /eject /burn /crash /teleplayer /setname /banwarn");
    
SendClientMessage(playeridCOLOR_WHITE"/die /lock /unlock /god /sgod /get /goto /vget /vgoto /setskin /setskintome /setscore /kick /ban /rangeban /freeze");
    
SendClientMessage(playeridCOLOR_WHITE"/unfreeze /slap /explode /spec /specoff /givemoney /setplayerinterior /cchat /reports /reportsoff /gmx /lock");
    
SendClientMessage(playeridCOLOR_WHITE"/setplayerweather /setplayertime /tempAdmin /makeadmin /playerdata /makeaccount /renameaccount /deleteaccount");
    
SendClientMessage(playeridCOLOR_YELLOWLanguageText[150]);
    
SendClientMessage(playeridCOLOR_LIGHTRED"***************************************************************************");
     return 
1;
  }
  return 
0;

acmd2(playerid,params[]){
  
#pragma unused params
  
if(Account[playerid][pAdminlevel]>=1){
    
SendClientMessage(playeridCOLOR_ZADMINBLUELanguageText[152]);
    
SendClientMessage(playeridCOLOR_WHITE"/aheal /aarmour/amute /aunmute /ajail /aunjail /agivemoney /adie /adisarm /areset");
    
SendClientMessage(playeridCOLOR_WHITE"/aexplode /akick /aban /afreeze /aunfreeze /aslap /aget /agoto /asetweather /asettime");
    
SendClientMessage(playeridCOLOR_LIGHTRED"***************************************************************************");
    return 
1;
  }
  return 
0;




Re: Zadmin acmd1 & acmd2 commands not working in server - brandypol - 06.09.2015

Quote:
Originally Posted by Logofero
Посмотреть сообщение
for someone to fix it?
You checked my example?

PHP код:
public OnPlayerCommandText(playeridcmdtext[]) {
     if (
acmd1(playeridcmdtext)) return 1;
     if (
acmd2(playeridcmdtext)) return 1;
     return 
0;
}
acmd1(playerid,params[]){
  
#pragma unused params
  
if(Account[playerid][pAdminlevel]>=1){
    
SendClientMessage(playeridCOLOR_ZADMINBLUELanguageText[149]);
    
SendClientMessage(playeridCOLOR_WHITE"/asay /announce  |  # [text] (it's private admin chat!)  /acmd2 /admincolor /playersrecord /defultsetting");
    
SendClientMessage(playeridCOLOR_WHITE"/muted /freezed /jailed /makevip /removevip /savepersonalcar /replacepersonalcar");
    
SendClientMessage(playeridCOLOR_WHITE"/veh /fix /fixpv /flip /givecar /heal /jetp /armour /mute /unmute /jail /unjail /disarm /removeweapon /reset /warn");
    
SendClientMessage(playeridCOLOR_WHITE"/setweather /settime /carcolor /getip /getvhealth /setvhealth /eject /burn /crash /teleplayer /setname /banwarn");
    
SendClientMessage(playeridCOLOR_WHITE"/die /lock /unlock /god /sgod /get /goto /vget /vgoto /setskin /setskintome /setscore /kick /ban /rangeban /freeze");
    
SendClientMessage(playeridCOLOR_WHITE"/unfreeze /slap /explode /spec /specoff /givemoney /setplayerinterior /cchat /reports /reportsoff /gmx /lock");
    
SendClientMessage(playeridCOLOR_WHITE"/setplayerweather /setplayertime /tempAdmin /makeadmin /playerdata /makeaccount /renameaccount /deleteaccount");
    
SendClientMessage(playeridCOLOR_YELLOWLanguageText[150]);
    
SendClientMessage(playeridCOLOR_LIGHTRED"***************************************************************************");
     return 
1;
  }
  return 
0;

acmd2(playerid,params[]){
  
#pragma unused params
  
if(Account[playerid][pAdminlevel]>=1){
    
SendClientMessage(playeridCOLOR_ZADMINBLUELanguageText[152]);
    
SendClientMessage(playeridCOLOR_WHITE"/aheal /aarmour/amute /aunmute /ajail /aunjail /agivemoney /adie /adisarm /areset");
    
SendClientMessage(playeridCOLOR_WHITE"/aexplode /akick /aban /afreeze /aunfreeze /aslap /aget /agoto /asetweather /asettime");
    
SendClientMessage(playeridCOLOR_LIGHTRED"***************************************************************************");
    return 
1;
  }
  return 
0;

yes but I got two undefined symbols :

error 017: undefined symbol "dcmd_acmd1"
error 017: undefined symbol "dcmd_acmd2"

and one warning :

warning 217: loose indentation


Re: Zadmin acmd1 & acmd2 commands not working in server - Logofero - 07.09.2015

@brandypol
> yes but I got two undefined symbols :
> error 017: undefined symbol "dcmd_acmd1"
> error 017: undefined symbol "dcmd_acmd2"
> and one warning :
> warning 217: loose indentation

1 Find in code. I guess it OnPlayerCommandText
Код:
error 017: undefined symbol "dcmd_acmd1"
error 017: undefined symbol "dcmd_acmd2"
2 Remove dcmd_acmd1, dcmd_acmd2
3 Add lines
PHP код:
public OnPlayerCommandText(playeridcmdtext[]) {
     if (
acmd1(playeridcmdtext)) return 1;
     if (
acmd2(playeridcmdtext)) return 1;
     return 
0;

4 Recompile filterscript/gamemode.

NOTE: You must exist:
PHP код:
acmd1(playerid,params[]){
  
#pragma unused params
  
if(Account[playerid][pAdminlevel]>=1){
    
SendClientMessage(playeridCOLOR_ZADMINBLUELanguageText[149]);
    
SendClientMessage(playeridCOLOR_WHITE"/asay /announce  |  # [text] (it's private admin chat!)  /acmd2 /admincolor /playersrecord /defultsetting");
    
SendClientMessage(playeridCOLOR_WHITE"/muted /freezed /jailed /makevip /removevip /savepersonalcar /replacepersonalcar");
    
SendClientMessage(playeridCOLOR_WHITE"/veh /fix /fixpv /flip /givecar /heal /jetp /armour /mute /unmute /jail /unjail /disarm /removeweapon /reset /warn");
    
SendClientMessage(playeridCOLOR_WHITE"/setweather /settime /carcolor /getip /getvhealth /setvhealth /eject /burn /crash /teleplayer /setname /banwarn");
    
SendClientMessage(playeridCOLOR_WHITE"/die /lock /unlock /god /sgod /get /goto /vget /vgoto /setskin /setskintome /setscore /kick /ban /rangeban /freeze");
    
SendClientMessage(playeridCOLOR_WHITE"/unfreeze /slap /explode /spec /specoff /givemoney /setplayerinterior /cchat /reports /reportsoff /gmx /lock");
    
SendClientMessage(playeridCOLOR_WHITE"/setplayerweather /setplayertime /tempAdmin /makeadmin /playerdata /makeaccount /renameaccount /deleteaccount");
    
SendClientMessage(playeridCOLOR_YELLOWLanguageText[150]);
    
SendClientMessage(playeridCOLOR_LIGHTRED"***************************************************************************");
     return 
1;
  }
  return 
0;

acmd2(playerid,params[]){
  
#pragma unused params
  
if(Account[playerid][pAdminlevel]>=1){
    
SendClientMessage(playeridCOLOR_ZADMINBLUELanguageText[152]);
    
SendClientMessage(playeridCOLOR_WHITE"/aheal /aarmour/amute /aunmute /ajail /aunjail /agivemoney /adie /adisarm /areset");
    
SendClientMessage(playeridCOLOR_WHITE"/aexplode /akick /aban /afreeze /aunfreeze /aslap /aget /agoto /asetweather /asettime");
    
SendClientMessage(playeridCOLOR_LIGHTRED"***************************************************************************");
    return 
1;
  }
  return 
0;