MoneyBag help
#1

hi there, i'm come back
i have problem again with Moneybag System (Sory for doublepost).

I have moneybag system, when the moneybag event started its not bug, but after i got the moneybag
and i got money its still nothing bugs(moneybag event is stopped). and i go to my house (ingame).
when i touch the house pickup i will got the moneybag, but Moneybag Event is already Stopped yet.

BUG:When i touch house icons or other pickup, will get Moneybags...

This My code
Код:
public MoneyBag()
{
	if(!MoneyBagFound)
	{
		format(strg, sizeof(strg), ""red"MONEYBAG: "white"The "yellow"money bag "white"still hasn't been found in: "orange"%s", MoneyBagLocation);
		SendClientMessageToAll(-1, strg);
	}
	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][Positions]);
		format(strg, sizeof(strg), ""red"MONEYBAG: "white"A Money Bag is placed somewhere in "yellow"%s, "white"Go for it. It contains big cash!", MoneyBagLocation);
		SendClientMessageToAll(-1, strg);
		DestroyPickup(MoneyBagPickup);
		MoneyBagPickup = CreatePickup(1550, 2, MoneyBagPos[0], MoneyBagPos[1], MoneyBagPos[2], -1);
	}
	return 1;
}

	new str[128];
	if(pickupid == MoneyBagPickup)
    {
		new money = MoneyBagCash;
		new str2[140];
     	format(str2, sizeof(str2), "MONEYBAG: %s(%d) found the Money Bag that had inside "COL_GREEN"$%d, "white"Located in: "red"%s", GetName(playerid), playerid, money, MoneyBagLocation);
        SendClientMessageToAll(COLOR_WHITE, str2);
		MoneyBagFound = 1;
        DestroyPickup(MoneyBagPickup);
        SendClientMessage(playerid, COLOR_LIME, "[MoneyBag]: You've found the money bag!");
		GivePlayerCash(playerid, money);
        SetPlayerScore(playerid, GetPlayerScore(playerid) + 2);
        ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
        return 1;
    }


public OnGameModeInit()
{
	MoneyBagFound = 1;
return 1;
}
if you need any code please tell me
help please, and i will give you a +Rep If you want lol
Reply
#2

help please!, This is my final project to enhance my gamemode
Reply
#3

I don't see a single SetTimer or SetTimerEx line...?
Reply
#4

this the moneybag timers
Код:
#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(3)+5)*10000)

public OnGameModeInit();
{
timer2[8] = SetTimer("MoneyBag", MB_DELAY, true);
return 1;
}
Reply
#5

Okay, I'm using moneybag system by [HIC]Killers '' https://sampforum.blast.hk/showthread.php?tid=273981 '' please help me whit this, For Complete my gamemode, please help me!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)