format(string,sizeof(string),"**The {33FF66} Money bag {FFFFFF}has {FF0000} not {FFFFFF} been found, it is still hidden in {FFFF66} %s", MoneyBagLocation);
SendClientMessage(playerid,-1,"Money bag turned {FF0000} off!");
return1;
}
if(Timer[0]==1)
{
Timer[1]=SetTimer("MoneyBag", MB_DELAY,true);
Timer[0]=0;
SendClientMessage(playerid,-1,"Money bag turned {33FF66} on!");
return1;
}
return1;
}
}
if(!strcmp("/moneybag", cmdtext,true))
{
new string[150];
if(!MoneyBagFound) format(string,sizeof(string),"**The {33FF66}Money Bag has been {FF0000}hidden in {FFFF66}%s!", MoneyBagLocation);
if(MoneyBagFound) format(string,sizeof(string),"**The {33FF66}Money Bag is {FF0000} not running!");
returnSendClientMessage(playerid,-1, string);
}
return0;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == MoneyBagPickup)
{
new string[180], pname[24], money = MoneyBagCash;
GetPlayerName(playerid, pname,24);
format(string,sizeof(string),"** {99FFFF}%s{FFFFFF} has found the {33FF66}money bag{FFFFFF} that had {33FF00}$%d {FFFFFF}inside, located in %s", pname, money, MoneyBagLocation);
MoneyBagFound =1;
SendClientMessageToAll(-1, string);
DestroyPickup(MoneyBagPickup);
SendClientMessage(playerid,-1,"You have found the {33FF66} Money Bag!");