Option Commands not working
#3

Well, I couldn't really find the word to fit what I mean. I do /b Test and it will just send me the text syntax. It does this will all commands that require text after it, so. /b, /o, /kick, /ban, etc etc. Its all the commands that need text or an ID after the command for it to work. Single commands like /admins, /stats, /help work. I don't know how I can do this. I think it could be strtok but I am not sure.

Just incase;

pawn Код:
CMD:b(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SCM(playerid, COLOR_GREY, "** You havent logged in yet !");
            return 1;
        }
        if(PlayerInfo[playerid][pMuted] == 1)
        {
            SCM(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
            return 1;
        }
        new result[128],y,m,d,h,mi,s;
        getdate(y,m,d); gettime(h,mi,s);
        if(sscanf(params, "s[128]", result)) return SCM(playerid, COLOR_GRAD2, "USAGE: /b [local ooc chat]");
        if(PlayerInfo[playerid][pAdminDuty] == 1)
        {
            format(tstring, sizeof(tstring), "(( Admin Says: %s ))", result);
        }
        if(PlayerInfo[playerid][pMod] == 1 && ModDuty[playerid] == 1)
        {
            format(tstring, sizeof(tstring), "(( Moderator Says: %s ))", result);
        }
        if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 1)
        {
            format(tstring, sizeof(tstring), "(( Stranger Says: %s ))", result);
        }
        if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 0)
        {
            format(tstring, sizeof(tstring), "(( %s Says: %s ))", GPN(playerid), result);
        }
        ProxDetector(20.0, playerid, tstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
        format(cstring, sizeof(cstring), "(%d/%d/%d)[%d:%d:%d] %s (Local OOC): %s",d,m,y,h,mi,s, GPN(playerid), result);
        ChatLog(cstring);
    }
    return 1;
}
Reply


Messages In This Thread
Option Commands not working - by Swarn - 30.12.2015, 12:20
Re: Option Commands not working - by saffierr - 30.12.2015, 12:27
Re: Option Commands not working - by Swarn - 30.12.2015, 12:38
Re: Option Commands not working - by saffierr - 30.12.2015, 12:44
Re: Option Commands not working - by Amunra - 30.12.2015, 12:51
Re: Option Commands not working - by Swarn - 30.12.2015, 12:52
Re: Option Commands not working - by Swarn - 30.12.2015, 12:56
Re: Option Commands not working - by Amunra - 30.12.2015, 12:59
Re: Option Commands not working - by IceBilizard - 30.12.2015, 13:05
Re: Option Commands not working - by Swarn - 30.12.2015, 13:30

Forum Jump:


Users browsing this thread: 1 Guest(s)