Jump to content
  • 0

Nu iti mai trage banii


Jimmi

Question

Problema intalnita (descriere):Am rezolvat o problema la bizfee.Daca dau pe ENTER sa intru in biz imi trage dar nu ma baga in biz.Poate dupa cateva incercari, iar daca dau /enter imi i-a banii cand ies din biz nu cand intru.Cum pot face sa imi i-a banii cand intru.
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul(obligatoriu):
Imagini / Video (optional):Aici cu bug-ul:https://www.youtube.com/watch?v=QO6SRxuSHmM&feature=youtu.be
Ati incercat sa rezolvati singur?:Da

for(new i = 0; i < sizeof(BizzInfo); i++)
            {
                CheatTimer[playerid] = 3;
                if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
                {
                    if(!IsACop(playerid) && i == 3)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "   Doar pentru politisti !");
                        return 1;
                    }
                    if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerCash(playerid) >= BizzInfo[i][bEntranceCost])
                    {
                        //if(PlayerInfo[playerid][pPbiskey] != i)
                        {
                            if(BizzInfo[i][bLocked] == 1)
                            {
                                GameTextForPlayer(playerid, "~r~Inchis", 5000, 1);
                                return 1;
                            }
                            if(GetPlayerInterior(playerid) == 17) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}24/7: {FFFFFF}Foloseste /buy pentru a cumpara ceva!");
                            if(GetPlayerInterior(playerid) == 3) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Sex Shop: {FFFFFF}Foloseste /buy pentru a cumpara ceva!");
                            if(GetPlayerInterior(playerid) == 10) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Burger Shot: {FFFFFF}Scrie /eat pentru a manca ceva!");
                            if(GetPlayerInterior(playerid) == 5) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Well Stacked Pizza: {FFFFFF}Scrie /eat pentru a manca ceva!");
                            if(GetPlayerInterior(playerid) == 9) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Cluckin' Bell: {FFFFFF}Scrie /eat pentru a manca ceva!");
                            GivePlayerMoneyEx(playerid,-BizzInfo[i][bEntranceCost]);
                            format(string, sizeof(string), "~r~-$%d~n~~w~scrie /exit~n~pentru a iesi", BizzInfo[i][bEntranceCost]);
                            BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
                            ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
                            BizzInfo[i][bProducts]--;
                            OnPropUpdate();
                            GameTextForPlayer(playerid, string, 5000, 3);
                        }
                        SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
                        SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
                        SetPlayerVirtualWorld(playerid, i);
                        PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
                        PlayerInfo[playerid][pLocal] = i+99;
                        new dood[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, dood, sizeof(dood));
                        format(string, sizeof(string), "%s payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i);
                        printf("%s", string);
                        PayLog(string);
                    }
                    else
                    {
                        GameTextForPlayer(playerid, "~r~Nu ai destui bani", 5000, 1);
                    }
                }
            }
si aici:
for(new i = 0; i < sizeof(BizzInfo); i++)
            {
                if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
                {
                    //printf("Found House :%d",i);
                    if(!IsACop(playerid) && i == 3)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "   Loc rezervat Politiei Romane !");
                        return 1;
                    }
                    if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerCash(playerid) >= BizzInfo[i][bEntranceCost])
                    {
                        if(PlayerInfo[playerid][pPbiskey] != i)
                        {
                            if(BizzInfo[i][bLocked] == 1)
                            {
                                GameTextForPlayer(playerid, "~r~Inchis", 5000, 1);
                                return 1;
                            }
                            if(BizzInfo[i][bProducts] == 0)
                            {
                                GameTextForPlayer(playerid, "~r~Stoc epuizat", 5000, 1);
                                return 1;
                            }
                            GivePlayerMoneyEx(playerid,-BizzInfo[i][bEntranceCost]);
                            format(string, sizeof(string), "~r~-$%d~n~~w~scrie /exit~n~pentru a iesi", BizzInfo[i][bEntranceCost]);
                            BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
                            ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
                            BizzInfo[i][bProducts]--;
                            OnPropUpdate();
                            GameTextForPlayer(playerid, string, 5000, 3);
                        }
                        SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
                        SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
                        SetPlayerVirtualWorld(playerid, i);
                        PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
                        PlayerInfo[playerid][pLocal] = i+99;
                        new dood[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, dood, sizeof(dood));
                        format(string, sizeof(string), "%s payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i);
                        printf("%s", string);
                        PayLog(string);
                        if(GetPlayerInterior(playerid) == 17) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}24/7: {FFFFFF}Scrie /buy pentru a cumpara ceva!");
                        if(GetPlayerInterior(playerid) == 3) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Sex Shop: {FFFFFF}Scrie /buy pentru a cumpara ceva!");
                        if(GetPlayerInterior(playerid) == 10) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Burger Shot: {FFFFFF}Scrie /eat pentru a manca ceva!");
                        if(GetPlayerInterior(playerid) == 5) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Well Stacked Pizza: {FFFFFF}Scrie /eat pentru a manca ceva!");
                        if(GetPlayerInterior(playerid) == 9) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Cluckin' Bell: {FFFFFF}Scrie /eat pentru a manca ceva!");
                        //PlayerInfo[playerid][pLocal] = i;
                    }
                    else
                    {
                        GameTextForPlayer(playerid, "~r~Nu ai destui bani", 5000, 1);
                    }
                }
            }
si aici parte din comanda /enter
for(new i = 0; i < sizeof(BizzInfo); i++)
            {
                if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
                {
                    //printf("Found House :%d",i);
                    if(!IsACop(playerid) && i == 3)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "   Loc rezervat Politiei Romane !");
                        return 1;
                    }
                    if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerCash(playerid) >= BizzInfo[i][bEntranceCost])
                    {
                        if(PlayerInfo[playerid][pPbiskey] != i)
                        {
                            if(BizzInfo[i][bLocked] == 1)
                            {
                                GameTextForPlayer(playerid, "~r~Inchis", 5000, 1);
                                return 1;
                            }
                            if(BizzInfo[i][bProducts] == 0)
                            {
                                GameTextForPlayer(playerid, "~r~Stoc epuizat", 5000, 1);
                                return 1;
                            }
                            GivePlayerMoneyEx(playerid,-BizzInfo[i][bEntranceCost]);
                            format(string, sizeof(string), "~r~-$%d~n~~w~scrie /exit~n~pentru a iesi", BizzInfo[i][bEntranceCost]);
                            BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
                            ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
                            BizzInfo[i][bProducts]--;
                            OnPropUpdate();
                            GameTextForPlayer(playerid, string, 5000, 3);
                        }
                        SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
                        SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
                        SetPlayerVirtualWorld(playerid, i);
                        PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
                        PlayerInfo[playerid][pLocal] = i+99;
                        new dood[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, dood, sizeof(dood));
                        format(string, sizeof(string), "%s payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i);
                        printf("%s", string);
                        PayLog(string);
                        if(GetPlayerInterior(playerid) == 17) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}24/7: {FFFFFF}Scrie /buy pentru a cumpara ceva!");
                        if(GetPlayerInterior(playerid) == 3) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Sex Shop: {FFFFFF}Scrie /buy pentru a cumpara ceva!");
                        if(GetPlayerInterior(playerid) == 10) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Burger Shot: {FFFFFF}Scrie /eat pentru a manca ceva!");
                        if(GetPlayerInterior(playerid) == 5) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Well Stacked Pizza: {FFFFFF}Scrie /eat pentru a manca ceva!");
                        if(GetPlayerInterior(playerid) == 9) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Cluckin' Bell: {FFFFFF}Scrie /eat pentru a manca ceva!");
                        //PlayerInfo[playerid][pLocal] = i;
                    }
                    else
                    {
                        GameTextForPlayer(playerid, "~r~Nu ai destui bani", 5000, 1);
                    }
                }
            }
Edited by jimmi
Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Nu inteleg ce vrei sa zici. Eu ti-am dat verificare care o face atunci cand vrea sa ii ia banii jucatorului, de asta nu ii ia banii si proprietarului. (Este de la tine din gamemode nu am facut-o eu)

Daca vrei sa ii ia banii si lui comenteaza acea verificare de ti-am dat-o.

Link to comment
Share on other sites

  • 0

In acest pentru (for)

for(new i = 0; i < sizeof(BizzInfo); i++)

ai verificarea asta

if(PlayerInfo[playerid][pPbiskey] != i)

cand ajunge la verificarea asta n-o sa ii ia banii jucatorului daca el este proprietarul!

Daca vrei sa ii ia banii si proprietarului, atunci comenteaza-o. (Adica pune // in fata ei)

Link to comment
Share on other sites

  • 0

Mersi dar tot sunt probleme.Daca dau /enter imi trage banii cand ies din biz nu cand intru.

for(new i = 0; i < sizeof(BizzInfo); i++)
            {
                CheatTimer[playerid] = 3;
                if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
                {
                    if(!IsACop(playerid) && i == 3)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "   Doar pentru politisti !");
                        return 1;
                    }
                    if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerCash(playerid) >= BizzInfo[i][bEntranceCost])
                    {
                        //if(PlayerInfo[playerid][pPbiskey] != i)
                        {
                            if(BizzInfo[i][bLocked] == 1)
                            {
                                GameTextForPlayer(playerid, "~r~Inchis", 5000, 1);
                                return 1;
                            }
                            if(GetPlayerInterior(playerid) == 17) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}24/7: {FFFFFF}Foloseste /buy pentru a cumpara ceva!");
                            if(GetPlayerInterior(playerid) == 3) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Sex Shop: {FFFFFF}Foloseste /buy pentru a cumpara ceva!");
                            if(GetPlayerInterior(playerid) == 10) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Burger Shot: {FFFFFF}Scrie /eat pentru a manca ceva!");
                            if(GetPlayerInterior(playerid) == 5) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Well Stacked Pizza: {FFFFFF}Scrie /eat pentru a manca ceva!");
                            if(GetPlayerInterior(playerid) == 9) SendClientMessage(playerid, COLOR_WHITE, "{0066FF}Cluckin' Bell: {FFFFFF}Scrie /eat pentru a manca ceva!");
                            GivePlayerMoneyEx(playerid,-BizzInfo[i][bEntranceCost]);
                            format(string, sizeof(string), "~r~-$%d~n~~w~scrie /exit~n~pentru a iesi", BizzInfo[i][bEntranceCost]);
                            BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
                            ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
                            BizzInfo[i][bProducts]--;
                            OnPropUpdate();
                            GameTextForPlayer(playerid, string, 5000, 3);
                        }
                        SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
                        SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
                        SetPlayerVirtualWorld(playerid, i);
                        PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
                        PlayerInfo[playerid][pLocal] = i+99;
                        new dood[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, dood, sizeof(dood));
                        format(string, sizeof(string), "%s payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i);
                        printf("%s", string);
                        PayLog(string);
                    }
                    else
                    {
                        GameTextForPlayer(playerid, "~r~Nu ai destui bani", 5000, 1);
                    }
                }
            }
Link to comment
Share on other sites

  • 0

am zis ca sunt mai explicit.Habar nu am.

ceva cu exit cred.Asta am in comanda /exit

[

	for(new i = 0; i <  sizeof(BizzInfo); i++)
			{
				//printf("Bizz :%d",i);
				if (PlayerToPoint(3, playerid,BizzInfo[GetPlayerVirtualWorld(playerid)][bExitX], BizzInfo[GetPlayerVirtualWorld(playerid)][bExitY], BizzInfo[GetPlayerVirtualWorld(playerid)][bExitZ]))
				{
					SetPlayerInterior(playerid,0);
					PlayerInfo[playerid][pInt] = 0;
					SetPlayerPos(playerid,BizzInfo[GetPlayerVirtualWorld(playerid)][bEntranceX],BizzInfo[GetPlayerVirtualWorld(playerid)][bEntranceY],BizzInfo[GetPlayerVirtualWorld(playerid)][bEntranceZ]);
					PlayerInfo[playerid][pLocal] = 255;
					SetPlayerVirtualWorld(playerid, 0);
				}
			}
			return 1;

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.