admin command only
#3

Quote:
Originally Posted by Weirdosport
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
        {
        if(IsPlayerAdmin(playerid))
            {
            //command
            }
        else
            {
            SendClientMessage(playerid, 0xFF00FFFF, "You're not an admin, sorry");
            }
        }

    return 0;
}
i get errors
its only at this:

pawn Код:
}
        }

    return 0;
}
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return 0;
}
#endif
and this are the errors:

pawn Код:
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminCommand.pwn(37) : warning 217: loose indentation
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminCommand.pwn(39) : error 010: invalid function or declaration
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminCommand.pwn(42) : error 010: invalid function or declaration
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminCommand.pwn(44) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
and this is line 37 39 24 and 44:

37:
pawn Код:
return 0;
39:
pawn Код:
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
42:
pawn Код:
return 1;
44:
pawn Код:
return 0;
please help me ty alot
Reply


Messages In This Thread
admin command only - by luckie12 - 12.05.2009, 16:14
Re: admin command only - by Weirdosport - 12.05.2009, 16:18
Re: admin command only - by luckie12 - 12.05.2009, 16:27
Re: admin command only - by Weirdosport - 12.05.2009, 16:46

Forum Jump:


Users browsing this thread: 1 Guest(s)