MoneyBag help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MoneyBag help (
/showthread.php?tid=517096)
MoneyBag help -
TazmaNiax - 03.06.2014
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
Re: MoneyBag help -
TazmaNiax - 03.06.2014
help please!, This is my final project to enhance my gamemode
Re: MoneyBag help -
Threshold - 03.06.2014
I don't see a single SetTimer or SetTimerEx line...?
Re: MoneyBag help -
TazmaNiax - 04.06.2014
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;
}
Re: MoneyBag help -
TazmaNiax - 05.06.2014
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!