SA-MP Forums Archive
Command doesn't work as admin - 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: Command doesn't work as admin (/showthread.php?tid=587199)



Command doesn't work as admin - babu2013 - 28.08.2015

Quote:

CMD:ar(playerid,params[])
{
new pID, string[128];
if (PlayerData[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_WHITE,"{7a0f27}Ni velul tau de admin nu permite folosirea acestei comenzi!");
if(sscanf(params,"u",pID)) return SendClientMessage(playerid,COLOR_WHITE,"Sintaxa: /ar [ID]");
format(string,sizeof(string),"Adminul %s a deschis reportul dumneavoastra. Pentru a vorbii",Name(playerid));
SendClientMessage(pID,COLOR_YELLOW,string);
SendClientMessage(playerid,COLOR_YELLOW,"Reportul a fost deschis! Pentru a vorbi in live chat folositi(/ra).");
SetPVarInt(playerid,"LiveChat",1);
SetPVarInt(pID,"LiveChat",1);
SetPVarInt(pID,"Report",0);
SetPVarInt(playerid,"RJucator",pID);
SetPVarInt(pID,"RJucator",playerid);
return 0;
}

As i'm logged as admin and rcon admin, it doesn't work. It worked before but now idk what is wrong. Please help!!


Re: Command doesn't work as admin - Boot - 28.08.2015

Should not the command return 1; ?


Re: Command doesn't work as admin - babu2013 - 29.08.2015

Oh, i didn't see that. I'll try what you say and i'll tell you if it worked!
Edit: It returns 1 for every command but still doesn't work


Re: Command doesn't work as admin - JaKe Elite - 29.08.2015

Does it said anything or when you type the command, there's nothing?
Also are you sure you are in the proper level to use the command?


Re: Command doesn't work as admin - babu2013 - 29.08.2015

Yes, i'm sure. It says this: Nivelul tau de admin nu permite folosirea acestei comenzi! that means that my admin lvl is not high enough to use this command. My admin lvl is 7, so i don't see why it doesn't work...


Re: Command doesn't work as admin - JaKe Elite - 29.08.2015

Are you using any admin system than this one? Maybe it is interfering with it? I don't see any problem in your code at all except you are using PVars (which is slow) & are returning 0; on the cmd (which would result on Unknown Command)


Re: Command doesn't work as admin - darkhunter332 - 29.08.2015

Maybe the command you are using isn't working well,Try to install a new admin system or find a better code.

I suggest you to try DomAdmin,Very simple and easy to use.