Help me, i have a bug script...
#1

1.) Why do I type the command /ad always had to wait 60 seconds, and it always comes up .. so I can not use /ad
pawn Код:
if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_LIGHTRED,"ERROR: You havent logged in yet!");
                return true;
            }
            if(!PlayerToPoint(5.0, playerid, 1737.4242,-1270.6655,13.5446))
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: You need to be near the Advertisement Business.");
                return true;
            }
            if(Advertisement==1)
            {
                SendClientMessage(playerid,COLOR_LIGHTRED, "ERROR: You have to wait atleast 60 seconds before advertise again");
                return true;
            }
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[256];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "DEBUG: (/ad)vertise [advert text]");
                return true;
            }
            if ((!adds) && (Account[playerid][pAdmin] < 1))
            {
                format(string, sizeof(string), "   Please try again later %d seconds between Advertisements !",  (addtimer/1000));
                SendClientMessage(playerid, COLOR_GRAD2, string);
                return true;
            }
            if(GetPlayerMoney(playerid) < 150)
            {
                SendClientMessage(playerid, COLOR_GREY, " You don't have enough money to advertise !");
                return true;
            }
            GiveMoney(playerid, - 150);
            if(Account[playerid][pPnumber] != 0)
            {
                format(string, sizeof(string), "Advertisement: %s, Contact: %s Phone: %d",  result, Account[playerid][pName],Account[playerid][pPnumber]);
            }
            else
            {
                format(string, sizeof(string), "Advertisement: %s, Contact: %s",  result, Account[playerid][pName]);
            }
            OOCNews(TEAM_GROVE_COLOR,string);
            Advertisement=1;
            SetTimerEx("EnableAdd",60000,false,"d",playerid);
        }
        return true;
    }
2.) The second time I use the command, always says "ERROR: Command not found, please type an existing command." but the command is working and can be used
pawn Код:
else if(strcmp(x_v,"pickup",true)==0)
            {
                if(Mobile[playerid] != 255)
                {
                    SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR:  You are already on a call...");
                    return 1;
                }
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        if(Mobile[i] == playerid)
                        {
                            Mobile[playerid] = i; //caller connecting
                            SendClientMessage(i,  COLOR_WHITE, "PHONE: Call picked up.");
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            format(string, sizeof(string), "* %s answers his cellphone.", sendername);
                            SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
                            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            RingTone[playerid] = 0;
                        }

                    }
                }
            }
3.) when I use the command /stats, and I've joined the Faction. and by the time I /stats do not appear like the following information about Faction
pawn Код:
if(Account[targetid][pMember] != 0)
        {
            format(coordsstring, sizeof(coordsstring), "Faction Name <%s> | Faction Rank <%s>",ttext, rtext);
            SendClientMessage(playerid, COLOR_WHITE,coordsstring);
        }
if anyone can help me?
Reply


Messages In This Thread
Help me, i have a bug script... - by Kazuo - 17.05.2012, 05:58
Re: Help me, i have a bug script... - by Kazuo - 17.05.2012, 06:42
Re: Help me, i have a bug script... - by RedWingz - 17.05.2012, 06:50
Re: Help me, i have a bug script... - by Kazuo - 17.05.2012, 07:50
Re: Help me, i have a bug script... - by TzAkS. - 17.05.2012, 08:58
[No subject] - by Kazuo - 17.05.2012, 09:21

Forum Jump:


Users browsing this thread: 1 Guest(s)