Jump to content
  • 0

problema script sacul cu bani


Dynamic

Question

am o problema la sacul cu bani. l-am bagat in gm a mers fara erori bine totul, dar cand intru pe server tot astept dar nu apare sacul nu stiu de ce si cand dau /sacul zice ca nu e activa.

va rog ajutatima

<a href="http://www.game-state.com/94.177.106.162:7777/"><img src="http://www.game-state.com/94.177.106.162:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a>

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

[pawn]enum mbinfo

{

        Float:XPOS,

        Float:YPOS,

        Float:ZPOS,

        Position[50]

};

new Float:MBSPAWN[][mbinfo] =

{

// Positions, (X, Y, Z, Location)

        {1544.8871,-1693.1235,13.9214, "Police LS"},

        {883.6549,-1516.7714,14.2323, "The Triads "},

        {2168.4043,-1458.7748,23.9844, "Ballas"},

        {2798.7700,-1997.1902,13.5533, "Los Santos Vagos"},

        {2512.7300,-1683.6602,13.4725, "Grove Street"},

        {650.3212,-1307.3025,13.6725, "Varioz Los Aztecas"},

        {-2311.7415,-1637.7587,483.7031, "Muntele Chilliad"},

        {134.512237, 1952.987426, 18.978763, "Area 51"},

        {-2353.547119, 2430.278320, 7.510148, "Bayside"},

        {1455.6147,-2307.9673,13.5469, "Aero LS"},

        {351.5012,2446.7690,16.8099, "Aero Parasit"},

        {1490.0616,2773.3286,10.8203, "NFS Club"},

        {2472.1912,1545.8702,10.8216, "NRG Club"},

        {-1408.7715,-243.7071,6.0000, "Aero SF"},

        {1638.8275,1633.2781,10.8203, "Aero LV"},

        {1767.0514,-1152.5845,24.3359, "GS/LS"},

        {1778.9139,-1308.8214,13.7171, "News Reporter"},

        {1951.6908,-1378.2253,18.5781, "Skate Park"},

        {1751.7148,-1845.8448,13.5777, "Gara LS"},

        {-1968.4534,111.2760,27.6875, "Gara SF"},

        {-1958.7644,269.1628,41.0471, "Rent Car [sF]"},

        {-2689.0938,1390.8561,7.0938, "Jizzy [sF]"},

        {2008.4602,1034.3915,10.8203, "The Mafia "},

        {79.1661,-170.2217,2.5863, "Blueberry"}

};

new Float:MoneyBagPos[3], MoneyBagFound=1, MoneyBagLocation[50], MoneyBagPickup, Timer[2];

//Hours, Minutes, Seconds, Milliseconds

#define MoneyBagDelay(%1,%2,%3,%4) (%1*3600000)+(%2*60000)+(%3*1000)+%4

//20 = 200,000 minimum 30 = 200,000 -> 500,000

#define MoneyBagCash ((random(30)+20)*1000)

//10 mins!

#define MB_DELAY MoneyBagDelay(0, 30, 0, 0)[/pawn]

[pawn]{

    if(IsPlayerAdmin(playerid))

    {

                if(!strcmp("/gotomb", cmdtext, true))

                {

                    SetPlayerPos(playerid, MoneyBagPos[0], MoneyBagPos[1] +3, MoneyBagPos[2]);

                    return SendClientMessage(playerid, -1, "You have been {FF0000}teleported {FFFFFF}to the {33FF66}money bag");

                }

                if(!strcmp("/startmb", cmdtext, true)) return MoneyBag();

                if(!strcmp("/togglemb", cmdtext, true))

                {

                        if(Timer[0] == 0)

                        {

                                KillTimer(Timer[1]);

                                Timer[0] = 1;

                                SendClientMessage(playerid, -1, "Money bag turned {FF0000} off!");

                                return 1;

                        }

                        if(Timer[0] == 1)

                        {

                            Timer[1] = SetTimer("MoneyBag", MB_DELAY, true);

                            Timer[0] = 0;

                            SendClientMessage(playerid, -1, "Money bag turned {33FF66} on!");

            return 1;

              }

}

}

if (strcmp(cmd, "/sacul", true) == 0)

{

new string2[150];

        if(!MoneyBagFound) format(string2, sizeof(string2), "**{FF9900}Sacul cu bani {FFFFFF}este ascuns in {99FFFF}%s {FFFFFF}si contine {33FF00}$%d!", MoneyBagLocation,  MoneyBagCash);

        if(MoneyBagFound) format(string2, sizeof(string2), "{FFFFFF}**Sacul cu bani nu a fost activat!");

        return SendClientMessage(playerid, -1, string2);

}

}[/pawn]

[pawn]forward MoneyBag();

public MoneyBag()

{

    new string[175], money = MoneyBagCash;

    if(!MoneyBagFound)

        {

            format(string, sizeof(string), "**{33FF66} Sacul cu bani {FFFFFF}nu a fost gasit,acesta se afla in {33FF00} %s", MoneyBagLocation);

            SendClientMessageToAll(-1, string);

        }

        else if(MoneyBagFound)

        {

          MoneyBagFound = 0;

            new randombag = random(sizeof(MBSPAWN));

            MoneyBagPos[0] = MBSPAWN[randombag][XPOS];

            MoneyBagPos[1] = MBSPAWN[randombag][YPOS];

            MoneyBagPos[2] = MBSPAWN[randombag][ZPOS];

            format(MoneyBagLocation, sizeof(MoneyBagLocation), "%s", MBSPAWN[randombag][Position]);

            format(string, sizeof(string), "**Un {FF9900}sac cu bani {FFFFFF} a fost ascuns in {33FF00}%s {FFFFFF}si contine {33FF00}$%d !", MoneyBagLocation, money);

      SendClientMessageToAll(-1, string);

        MoneyBagPickup = CreatePickup(1550, 2, MoneyBagPos[0], MoneyBagPos[1], MoneyBagPos[2], -1);

        }

    return 1;

}[/pawn]

<a href="http://www.game-state.com/94.177.106.162:7777/"><img src="http://www.game-state.com/94.177.106.162:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a>

Link to comment
Share on other sites

am rezolvat problema cu sacul puteti da tc!

<a href="http://www.game-state.com/94.177.106.162:7777/"><img src="http://www.game-state.com/94.177.106.162:7777/430x73_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a>

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.