13.01.2018, 08:53
Change this
To this
PHP код:
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;
}
PHP код:
forward MoneyBag();
public MoneyBag()
{
new string[175];
new randombag = random(sizeof(MBSPAWN));
if(!MoneyBagFound)
{
SendClientMessageToAll(-1, "{FF9900}SERVER: The Money bag has not been found, MoneyBag location changed.");
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: MoneyBag has been placed elsewhere, probably at %s.", MoneyBagLocation);
SendClientMessageToAll(-1, string);
DestroyPickup(MoneyBagPickup);
MoneyBagPickup = CreatePickup(1550, 2, MoneyBagPos[0], MoneyBagPos[1], MoneyBagPos[2], -1);
}
else if(MoneyBagFound)
{
MoneyBagFound = 0;
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;
}