Command doesn't work as admin
#1

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!!
Reply
#2

Should not the command return 1; ?
Reply
#3

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
Reply
#4

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?
Reply
#5

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...
Reply
#6

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)
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)