small problem
#4

Try
pawn Код:
IRCCMD:acmds(botid, channel[], user[], host[], params[])
{
    if (IRC_IsHalfop(botid, channel, user))
    {
        IRC_Notice(gGroupID,user,"IRC ADMIN COMMANDS");
        IRC_Notice(gGroupID,user,"Admin commands: !kick - !ban - !rcon - !announce - !freeze - !unfreeze - !explode - !mute - !unmute - !ip - !a - !money - !sall - !score - !banip - !unbanip - !hparm - !hostname - !mapname - !clearchat - !drop - !last - !serverstats - !gmx - !getweps - !stats - !warn - !ping - !setvip - !setlevel");
        return 1; // if the user is a half op, then you can return here to stop the command from going on and sending the rest of the messages
    }
   
    if (IRC_IsOp(botid, channel, user))
    {
        IRC_Notice(gGroupID,user,"IRC ADMIN COMMANDS");
        IRC_Notice(gGroupID,user,"Admin commands: !kick - !ban - !rcon - !announce - !freeze - !unfreeze - !explode");
        return 1; // same thing
    }
   
    if (IRC_IsVoice(botid, channel, user))
    {
        IRC_Notice(gGroupID,user,"For players command, type !cmds"); // you don't need to return here since the command will return 1 below automatically if the user isn't "voice"
    }
    return 1;
}
You just need to understand the basics of program flow.
Reply


Messages In This Thread
small problem - by Face9000 - 31.10.2012, 16:51
Re: small problem - by Face9000 - 31.10.2012, 20:49
Re: small problem - by Stu1 - 31.10.2012, 22:28
Re: small problem - by ReneG - 31.10.2012, 22:37

Forum Jump:


Users browsing this thread: 1 Guest(s)