Weird Change
#1

I've added :
pawn Код:
for(new b = 0; b < sizeof(BizzInfo); b++)
            {
I've changed :
pawn Код:
if (BizEntered[playerid] >= 26 && BizEntered[playerid] <= 32 || BizEntered[playerid] == 44 || BizEntered[playerid] == 54 || BizEntered[playerid] == 57)//centerpoint 24-7
to

pawn Код:
if(BizzInfo[b][bBizType] == 3 && BizEntered[playerid] == b)//centerpoint 24-7
            {
And now whenever I enter that command it just repeats this:

pawn Код:
SendClientMessage(playerid, COLOR_LIME, "------24/7 Store------");
                    SendClientMessage(playerid, COLOR_WHITE, "CellPhone($2000) - PhoneBook($5000) - FireExtinguisher($1000) - Laptop($10000)");
                    SendClientMessage(playerid, COLOR_WHITE, "Golfclub($1000) - Shovel($1000) - Flowers($50) - Cigarettes($5)");
                    SendClientMessage(playerid, COLOR_WHITE, "Para($2500) - Cane($1000) - Camera($1500) - MP4($2500) - Radio($3000)");
                    SendClientMessage(playerid, COLOR_GREY, ".: Usage: /buy [Item name] :.");
                    return 1;
What is causing this?

pawn Код:
for(new b = 0; b < sizeof(BizzInfo); b++)
            {
            new x_job[128];
            new shop = BizEntered[playerid];
            x_job = mystrtok(cmdtext, idx);
            if(BizzInfo[b][bBizType] == 3 && BizEntered[playerid] == b)//centerpoint 24-7
            {
                if(!strlen(x_job))
                {
                    SendClientMessage(playerid, COLOR_LIME, "------24/7 Store------");
                    SendClientMessage(playerid, COLOR_WHITE, "CellPhone($2000) - PhoneBook($5000) - FireExtinguisher($1000) - Laptop($10000)");
                    SendClientMessage(playerid, COLOR_WHITE, "Golfclub($1000) - Shovel($1000) - Flowers($50) - Cigarettes($5)");
                    SendClientMessage(playerid, COLOR_WHITE, "Para($2500) - Cane($1000) - Camera($1500) - MP4($2500) - Radio($3000)");
                    SendClientMessage(playerid, COLOR_GREY, ".: Usage: /buy [Item name] :.");
                    return 1;
                }
                tmp = mystrtok(cmdtext, idx);
                if(BizzInfo[shop][bProducts] == 0)
                {
                    SendClientMessage(playerid,COLOR_ERROR,"BIZ: Out of stock");
                    return 1;
                }
                if(strcmp(x_job,"cellphone",true) == 0 && Money[playerid] > 500)
                {

                    format(string, sizeof(string), "~r~-$%d", 2000);
                    GameTextForPlayer(playerid, string, 5000, 1);
                    GivePlayerMoney(playerid,-2000);
                    Money[playerid] -= 2000;
                    BizzInfo[shop][bBizCash] += 2000;
                    BizzInfo[shop][bProducts]--;
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    new randphone = 10000 + random(89999);//minimum 1000  max 9999
                    PlayerInfo[playerid][pPnumber] = randphone;
                    format(string, sizeof(string), "[24/7] You have successfully purchased phone. Phone Number:%d", randphone);
                    SendClientMessage(playerid, COLOR_OLIVE, string);
                    return 1;
                }
                else if(strcmp(x_job,"cigarettes",true) == 0 && Money[playerid] > 5)
                {
                    GivePlayerMoney(playerid,-5);
                    Money[playerid] -= 5;
                    BizzInfo[shop][bBizCash] += 5;
                    BizzInfo[shop][bProducts]--;
                    format(string, sizeof(string), "~r~-$%d", 5);
                    GameTextForPlayer(playerid, string, 5000, 1);

                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    PlayerInfo[playerid][pCigarettes] += 5;
                    format(string, sizeof(string), "[24/7] You have successfully purchased cigarettes. /smoke");
                    SendClientMessage(playerid, COLOR_OLIVE, string);
                    return 1;
                }
                else if(strcmp(x_job,"phonebook",true) == 0 && Money[playerid] > 5000)
                {
                    GivePlayerMoney(playerid,-5000);
                    Money[playerid] -= 5000;
                    BizzInfo[shop][bBizCash] += 5000;
                    BizzInfo[shop][bProducts]--;
                    format(string, sizeof(string), "~r~-$%d", 5000);
                    GameTextForPlayer(playerid, string, 5000, 1);

                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    PlayerInfo[playerid][pPhoneBook] = 1;
                    format(string, sizeof(string), "[24/7] You have successfully purchased phonebook. /number [PartOfName/ID]");
                    SendClientMessage(playerid, COLOR_OLIVE, string);
                    return 1;
                }
                else if(strcmp(x_job,"para",true) == 0 && Money[playerid] > 2500)
                {
                    GivePlayerMoney(playerid,-2500);
                    Money[playerid] -= 2500;
                    BizzInfo[shop][bBizCash] += 2500;
                    BizzInfo[shop][bProducts]--;
                    format(string, sizeof(string), "~r~-$%d", 2500);
                    GameTextForPlayer(playerid, string, 5000, 1);

                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    GivePlayerWeapon(playerid,46,1);
                    format(string, sizeof(string), "[24/7] You have successfully purchased parachute.");
                    SendClientMessage(playerid, COLOR_OLIVE, string);
                    return 1;
                }
                else if(strcmp(x_job,"laptop",true) == 0 && Money[playerid] > 10000)
                {
                    GivePlayerMoney(playerid,-10000);
                    Money[playerid] -= 10000;
                    BizzInfo[shop][bBizCash] += 10000;
                    BizzInfo[shop][bProducts]--;
                    format(string, sizeof(string), "~r~-$%d", 10000);
                    GameTextForPlayer(playerid, string, 5000, 1);

                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    PlayerInfo[playerid][pLaptop] = 1;
                    format(string, sizeof(string), "[24/7] You have successfully purchased laptop. /laptop");
                    SendClientMessage(playerid, COLOR_OLIVE, string);
                    return 1;
                }
                else if(strcmp(x_job,"FireExtinguisher",true) == 0 && Money[playerid] > 1000)
                {
                    GivePlayerMoney(playerid,-1000);
                    Money[playerid] -= 1000;
                    Money[playerid] -= 1000;
                    BizzInfo[shop][bBizCash] += 1000;
                    format(string, sizeof(string), "~r~-$%d", 5000);
                    GameTextForPlayer(playerid, string, 5000, 1);
                    BizzInfo[shop][bProducts]--;
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    GivePlayerWeapon(playerid, 42, 100);
                    format(string, sizeof(string), "[24/7] You have successfully purchased Fire extinguisher.");
                    SendClientMessage(playerid, COLOR_OLIVE, string);
                    return 1;
                }
                else if(strcmp(x_job,"golfclub",true) == 0 && Money[playerid] > 1000)
                {

                    GivePlayerMoney(playerid,-1000);
                    Money[playerid] -= 1000;
                    BizzInfo[shop][bBizCash] += 1000;
                    BizzInfo[shop][bProducts]--;
                    format(string, sizeof(string), "~r~-$%d", 5000);
                    GameTextForPlayer(playerid, string, 5000, 1);

                    BizzInfo[shop][bProducts]--;
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    GivePlayerWeapon(playerid, 2, 1);
                    format(string, sizeof(string), "[24/7] You have successfully purchased Golf Club.");
                    SendClientMessage(playerid, COLOR_OLIVE, string);
                    return 1;
                }
                else if(strcmp(x_job,"shovel",true) == 0 && Money[playerid] > 1000)
                {
                    GivePlayerMoney(playerid,-1000);
                    Money[playerid] -= 1000;
                    BizzInfo[shop][bBizCash] += 1000;
                    BizzInfo[shop][bProducts]--;

                    format(string, sizeof(string), "~r~-$%d", 5000);
                    GameTextForPlayer(playerid, string, 5000, 1);
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    GivePlayerWeapon(playerid, 6, 1);
                    format(string, sizeof(string), "[24/7] You have successfully purchased shovel.");
                    SendClientMessage(playerid, COLOR_OLIVE, string);
                    return 1;
                }
                else if(strcmp(x_job,"flowers",true) == 0 && Money[playerid] > 5000)
                {



                    GivePlayerMoney(playerid,-50);
                    BizzInfo[shop][bBizCash] += 50;
                    Money[playerid] -= 50;
                    format(string, sizeof(string), "~r~-$%d", 5000);
                    GameTextForPlayer(playerid, string, 5000, 1);
                    BizzInfo[shop][bProducts]--;
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    GivePlayerWeapon(playerid, 14, 1);
                    format(string, sizeof(string), "[24/7] You have successfully purchased Flowers.");
                    SendClientMessage(playerid, COLOR_OLIVE, string);
                    return 1;
                }
                else if(strcmp(x_job,"mp4",true) == 0 && Money[playerid] > 2500)
                {

                    GivePlayerMoney(playerid, - 2500);
                    BizzInfo[shop][bBizCash] += 2500;
                    Money[playerid] -= 2500;
                    BizzInfo[shop][bProducts]--;
                    format(string, sizeof(string), "~r~-$%d", 2500);
                    GameTextForPlayer(playerid, string, 5000, 1);
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    format(string, sizeof(string), "[24/7] You have successfully purchased MP4 player. /music [On/Off/Next]");
                    SendClientMessage(playerid, COLOR_OLIVE, string);
                    PlayerInfo[playerid][pCDPlayer] = 1;
                    return 1;
                }

                else if (strcmp(x_job,"Cane",true) == 0 && Money[playerid] > 1000)
                {

                    GivePlayerMoney(playerid,-1000);
                    BizzInfo[shop][bBizCash] += 1000;
                    Money[playerid] -= 1000;
                    format(string, sizeof(string), "~r~-$%d", 5000);
                    GameTextForPlayer(playerid, string, 5000, 1);
                    BizzInfo[shop][bProducts]--;
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    GivePlayerWeapon(playerid, 15, 1);
                    format(string, sizeof(string), "[24/7] You have successfully purchased Cane.");
                    SendClientMessage(playerid, COLOR_OLIVE, string);
                    return 1;
                }
                else if (strcmp(x_job,"Camera",true) == 0 && Money[playerid] > 1000)
                {

                    GivePlayerMoney(playerid,-1000);
                    BizzInfo[shop][bBizCash] += 1000;
                    Money[playerid] -= 1000;
                    format(string, sizeof(string), "~r~-$%d", 5000);
                    GameTextForPlayer(playerid, string, 5000, 1);
                    BizzInfo[shop][bProducts]--;
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    GivePlayerWeapon(playerid, 43, 10);
                    format(string, sizeof(string), "[24/7] You have successfully purchased Camera.");
                    SendClientMessage(playerid, COLOR_OLIVE, string);
                    return 1;
                }
                else if (strcmp(x_job,"Radio",true) == 0 && Money[playerid] > 3000)
                {

                    format(string, sizeof(string), "~r~-$%d", 500);
                    GameTextForPlayer(playerid, string, 5000, 1);
                    GivePlayerMoney(playerid,-1000);
                    Money[playerid] -= 1000;
                    BizzInfo[shop][bBizCash] += 1000;
                    BizzInfo[shop][bProducts]--;
                    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
                    new randfreq = 100001;
                    PlayerInfo[playerid][pFreq] = randfreq;
                    format(string, sizeof(string), "[24/7]Radio successfully purchased your freq is %d", randfreq);
                    SendClientMessage(playerid, COLOR_OLIVE, string);
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, COLOR_ERROR, "You don't have the cash for that !");
                }
            }
Reply


Messages In This Thread
Weird Change - by KnooL - 14.07.2010, 19:03
Re: Weird Change - by Carlton - 14.07.2010, 19:52
Re: Weird Change - by KnooL - 14.07.2010, 22:03
Re: Weird Change - by KnooL - 15.07.2010, 11:11
Re: Weird Change - by Hiddos - 15.07.2010, 12:30
Re: Weird Change - by KnooL - 15.07.2010, 13:45
Re: Weird Change - by Carlton - 15.07.2010, 13:52
Re: Weird Change - by Hiddos - 15.07.2010, 13:56
Re: Weird Change - by KnooL - 15.07.2010, 14:10
Re: Weird Change - by Finn - 15.07.2010, 14:34

Forum Jump:


Users browsing this thread: 1 Guest(s)