05.05.2012, 16:51
pawn Код:
enum bcinfo
{
Float:XPOS,
Float:YPOS,
Float:ZPOS,
Position[23]
};
pawn Код:
new Float:BriefCasePos[3], BriefCaseFound=1, BriefCaseLocation[23];
pawn Код:
forward briefCase();
pawn Код:
public briefCase()
{
new string[175];
if(!BriefCaseFound)
{
format(string, sizeof(string), "**The {33FF66} BriefCase {FFFFFF}has {FF0000} not {FFFFFF} been found, it is still hidden in {FFFF66} %s", BriefCaseLocation);
SendClientMessageToAll(-1, string);
}
else if(BriefCaseFound)
{
BriefCaseFound = 0;
new randomcase = random(sizeof(brifcase));
BriefCasePos[0] = brifcase[randomcase][XPOS];
BriefCase[1] = brifcase[randomcase][YPOS];
BriefCase[2] = brifcase[randomcase][ZPOS];
format(BriefCaseLocation, sizeof(BriefCaseLocation), "%s", brifcase[randomcase][Position]);
format(string, sizeof(string), "**The {33FF66}BriefCase has been {FF0000} hidden in {FFFF66} %s!", MoneyBagLocation);
SendClientMessageToAll(-1, string);
BriefCasePickup = CreatePickup(1210, 2, BriefCasePos[0], BriefCasePos[1], BriefCasePos[2], -1);
}
return 1;
}
and use
pawn Код:
new Float:brifcase[MAX_BRIF][briefinfo] =
{
{1499.01, -1803.68, 32.42, "Location 1"}, // 1
{1496.97, -1537.96, 66.59, "Location 2"},
{1406.25, -1304.29, 7.95, "Location 3"},
// ... and so on (add location name after coords)
};