1 Error
#1

Код:
CMD:acmds(playerid,params[])
{
    if (APlayerData[playerid][LoggedIn] == true)
	{
		if (APlayerData[playerid][PlayerLevel] <= 1)
		{
 		   I DONT WANT TO SHOW THE SENDCLIENTMESSAGES.
                 }
	        return 1;
}
error:

Код:
error 030: compound statement not closed at the end of file (started at line 2535)
I want that only server moderator can see it.. only level 1
Reply
#2

what?
Reply
#3

pawn Код:
CMD:acmds(playerid,params[])
{
    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (APlayerData[playerid][PlayerLevel] <= 1)
        {
            I DONT WANT TO SHOW THE SENDCLIENTMESSAGES.
        }
    }
    return 1;
}
??

I don't see the error but I did find a missing bracket.
Maybe that's it?
Reply
#4

it works but it is possible to make /acmds for all admins? i mean i added this:

Код:
CMD:acmds2(playerid,params[])
{
    if (APlayerData[playerid][LoggedIn] == true)
    { 
MY SENDCLIENTMESSAGES I DONT WANT TO SHOW IT
      		}
    }
    return 1;
}
CMD:acmds3(playerid,params[])
{
    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (APlayerData[playerid][PlayerLevel] >= 3)
        {
          MY SENDCLIENTMESSAGES I DONT WANT TO SHOW IT
      		}
    }
    return 1;
}
CMD:acmds4(playerid,params[])
{
    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (APlayerData[playerid][PlayerLevel] >= 4)
        {
            MY SENDCLIENTMESSAGES I DONT WANT TO SHOW IT
      		}
    }
    return 1;
}
Like : if level 1 admin types: /acmds > he will only see the level 1 sendclientmessage.
same thing for all ranks. i like if level 2 admin types /acmds he will only see the level 2 commands..
Reply
#5

Try

pawn Код:
CMD:acmds(playerid,params[])
{
    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (APlayerData[playerid][PlayerLevel] < 1)
                    return SendClientMessage(playerid,-1,"{B30000}[ERROR] {FFFFFF}You don't have access to this command.");
        if (APlayerData[playerid][PlayerLevel] == 1)
        {
            I DONT WANT TO SHOW THE SENDCLIENTMESSAGES.
        }
        else if (APlayerData[playerid][PlayerLevel] == 2)
        {
            // admin level 2
        }
        else if (APlayerData[playerid][PlayerLevel] == 3)
        {
            // admin level 3
        }
        else if (APlayerData[playerid][PlayerLevel] == 4)
        {
            // admin level 4
        }
    }
    return 1;
}
and just keep repeating it for the amount of admin levels u have.
Reply
#6

Код:
CMD:acmds(playerid,params[])
{
    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (APlayerData[playerid][PlayerLevel] < 1)
        return SendClientMessage(playerid,-1,"{B30000}[ERROR] {FFFFFF}You don't have access to this command.");
        if (APlayerData[playerid][PlayerLevel] >= 1)
        {
            I DONT WANT TO SHOW THE SENDCLIENTMESSAGES.
        }
        else if (APlayerData[playerid][PlayerLevel] >= 2)
        {
            // admin level 2
        }
        else if (APlayerData[playerid][PlayerLevel] >= 3)
        {
            // admin level 3
        }
        else if (APlayerData[playerid][PlayerLevel] >= 4)
        {
            // admin level 4
        }
        else if (APlayerData[playerid][PlayerLevel] >= 5)
        {
            // admin level 5
        }
    }
    return SendClientMessage(playerid, -1,"{B30000}[ERROR] {FFFFFF}You have ti be logged in to use this command !");
Reply
#7

An unexpected end of file occurred. One or more compound
statements are still unfinished (i.e. the closing brace "}" has not
been found). The error line number where the compound statement
started is given in the message.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)