Admin commands dont work - 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: Admin commands dont work (
/showthread.php?tid=460201)
Admin commands dont work -
NoahF - 27.08.2013
Recently I converted all the dcmd commands to zcmd, and it all worked but when I tried putting the admin variable into the admin commands the adm commands wont work. This is Stevo127's SFCRRPG GM.
Here is one of the commands:
Код:
CMD:adan(playerid,params[])
{
if(AdminLevel[playerid] == 3) *NOTE*I went in and placed variables like these but different levels for each admin command.***
{
new string[128];
if(!strlen(params))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /adan(nounce) (Message)");
return 1;
}
format(string,sizeof(string),"%s",params);
GameTextForAll(string,5000,0);
}
return 1;
}
Re: Admin commands dont work -
Finn707 - 27.08.2013
What errors do you get on compile, if any?
Re: Admin commands dont work -
Scrillex - 27.08.2013
What problems do you have with it?
Re: Admin commands dont work -
NoahF - 27.08.2013
It's funny because I don't get any errors. The commands don't do anything at all, nothing shows up when i type in the cmds
Re: Admin commands dont work -
Finn707 - 27.08.2013
Try this:
pawn Код:
CMD:adan(playerid, params[])
{
if(AdminLevel[playerid] == 3)
{
if(!strlen(params))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /adan(nounce) (Message)");
return 1;
}
else
{
new string[128];
format(string,sizeof(string),"%s",params);
GameTextForAll(string,5000,0);
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_ERROR,"You don't have permission to use this command.");
return 1;
}
return 1;
}