Some commands not working.
#3

I'm not usin it with zCMD. The problem is with strcmp. The commands don't work.

The placement of zCMD:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "Teade: Sa pead sisse logima!");
   
    new giveplayerid, moneys, idx;
    idx = 0;
    new string[128];
    new sendername[MAX_PLAYER_NAME];
    new giveplayer[MAX_PLAYER_NAME];
    new playername[MAX_PLAYER_NAME];
    new cmd[256];
    new tmp[256];
    cmd = strtok(cmdtext, idx);

        if(strcmp(cmd, "/togpm", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(KasutajaInfo[playerid][pDonateRank] > 2 || KasutajaInfo[playerid][pAdmin] > 1)
            {
                if (!HidePM[playerid])
                {
                    HidePM[playerid] = 1;
                    SendClientMessage(playerid, COLOR_GRAD2, "   PMs closed.");
                }
                else if (HidePM[playerid])
                {
                    HidePM[playerid] = 0;
                    SendClientMessage(playerid, COLOR_GRAD2, "   PMs opened.");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   Not an Admin / Premium Account User!");
                return 1;
            }
        }
        return 1;
    }

    new veateade[128];
    format(veateade, sizeof(veateade), "Unknown command.");
        return SendClientMessage(playerid,GREEN,veateade);
}
//---------------------------------zCMD------------------------------//
ZCMD COMMANDS
Reply


Messages In This Thread
Some commands not working. - by tsonn1 - 06.10.2012, 11:41
Re: Some commands not working. - by xMCx - 06.10.2012, 11:48
Re: Some commands not working. - by tsonn1 - 06.10.2012, 13:06
Re: Some commands not working. - by arakuta - 06.10.2012, 13:13
Re: Some commands not working. - by gtakillerIV - 06.10.2012, 13:14
Re: Some commands not working. - by tsonn1 - 06.10.2012, 13:33
Re: Some commands not working. - by gtakillerIV - 06.10.2012, 13:35
Re: Some commands not working. - by tsonn1 - 06.10.2012, 15:35
Re: Some commands not working. - by tsonn1 - 06.10.2012, 15:54
Re: Some commands not working. - by gtakillerIV - 06.10.2012, 16:30

Forum Jump:


Users browsing this thread: 2 Guest(s)