13.01.2018, 08:44
Hey there,
Well this Moneybag FS is supposed to change the location if the MB has not been found after one round.
For eg. The money bag has been hidden somewhere in the Emerald Isle (started)
After 10 min :- The Money bag has not been found, it is still hidden in Emerald Isle.
Again after 10 mins the same message is coming rather than changing the MB location.
I want it to change the location after 10 mins of saying 'its still hidden in ...'
Here is a part of the code
Thank you.
Well this Moneybag FS is supposed to change the location if the MB has not been found after one round.
For eg. The money bag has been hidden somewhere in the Emerald Isle (started)
After 10 min :- The Money bag has not been found, it is still hidden in Emerald Isle.
Again after 10 mins the same message is coming rather than changing the MB location.
I want it to change the location after 10 mins of saying 'its still hidden in ...'
Here is a part of the code
Код:
new Float:MoneyBagPos[3], MoneyBagFound=1, MoneyBagLocation[50], MoneyBagPickup=-1, Timer[2]; //Hours, Minutes, Seconds, Milliseconds #define MoneyBagDelay(%1,%2,%3,%4) (%1*3600000)+(%2*60000)+(%3*1000)+%4 //20 = 200,00 minimum 30 = 200,00 -> 500,00 #define MoneyBagCash ((random(40)+20)*1000) //10 mins! #define MB_DELAY MoneyBagDelay(0, 10, 0, 0) public OnFilterScriptInit() { Timer[1] = SetTimer("MoneyBag", MB_DELAY, true); return 1; } forward MoneyBag(); public MoneyBag() { new string[175]; if(!MoneyBagFound) { format(string, sizeof(string), "{FF9900}SERVER: The Money bag has not been found, it is still hidden in %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), "{FF9900}SERVER: The Money Bag has been hidden somewhere near/in %s!", MoneyBagLocation); SendClientMessageToAll(-1, string); MoneyBagPickup = CreatePickup(1550, 2, MoneyBagPos[0], MoneyBagPos[1], MoneyBagPos[2], -1); } return 1; }