#1

i can't use admin cmnds here it shows me unknown cmnd message
script
CMD:acmds(playerid)
{
if(pInfo[playerid][Adminlevel] < 1) return SCM(playerid, COLOR_ERROR, ""ERROR_MESSAGE"");
if(!pInfo[playerid][LoggedInAsAdmin]) return SCM(playerid,COLOR_ERROR,""ERROR_MESSAGE"");
HideAllServerTextDraws(playerid);
TextDrawShowForPlayer(playerid,acmds[0]);
TextDrawShowForPlayer(playerid,acmds[1]);
TextDrawShowForPlayer(playerid,acmds[2]);
TextDrawShowForPlayer(playerid,acmds[3]);
TextDrawShowForPlayer(playerid,acmds[8]);
viewing_acmds[playerid] =1;
page[1][playerid] =1;
return 1;
}
all admin cmnds are not working
Reply
#2

Try Replacing This
Код:
if(pInfo[playerid][Adminlevel] > 0)
Reply
#3

not working
Reply
#4

if(pInfo[playerid][Adminlevel] <= 1) return SCM(playerid, COLOR_ERROR, ""ERROR_MESSAGE"");
Reply
#5

not working
Reply
#6

Something wrong with ur textdraw
Reply
#7

try:
if(pInfo[playerid][Adminlevel] = 0) return SCM(playerid, COLOR_ERROR, ""ERROR_MESSAGE"");
idk lol,
or use this:if(!IsPlayerAdmin) return SCM(playerid, COLOR_ERROR, "ERROR_MESSAGE");
Reply
#8

If you get the default "SERVER: Unknown Command" message and the rest of the commands work, then it's probably a run time error.

Load crashdetect plugin and compile with -d3 flag.

https://github.com/Zeex/samp-plugin-...etect/releases
https://github.com/Zeex/samp-plugin-...ith-debug-info

After done those two things I mentioned above, re-compile, start the server and execute /acmds command.
If you get again the "SERVER: Unknown Command" message, post your server log.
Reply
#9

if(!pInfo[playerid][LoggedInAsAdmin]) return SCM(playerid,COLOR_ERROR,""ERROR_MESSAGE"");
i removed that line and its working
Reply
#10

Quote:
Originally Posted by silentl747
Посмотреть сообщение
if(!pInfo[playerid][LoggedInAsAdmin]) return SCM(playerid,COLOR_ERROR,""ERROR_MESSAGE"");
i removed that line and its working
Then the function "SCM(...)" has something wrong with it, mind posting it?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)