[AJUDA] Money Bag Bugada
#1

Fiz um sisteminha de Money Bag (mala de grana que aparece em um lugar randomico do mapa) com dicas. Mas as dicas tгo bugadas. exemplo: a mala de grana aparece em Idlewood mas a dica diz que estб em East Los Santos. Alguйm pode me ajudar?

Meu FS:

Код:
#define FILTERSCRIPT
#define AQUAGREEN   	0x03D687FF
#define COLOUR_YELLOW 	0xFFFF00AA
#define ADMINFS_MESSAGE_COLOR 0xFF444499
#define PM_INCOMING_COLOR     0xFFFF22AA
#define PM_OUTGOING_COLOR     0xFFCC2299
#define TEAM_GROVE_COLOR 0x00FF00AA
#define TEAM_BALLA_COLOR 0xFF00FFAA
#define TEAM_VAGOS_COLOR 0xFFFF00AA
#define TEAM_AZTECAS_COLOR 0x00CCFFAA
#define TEAM_MAFIA_COLOR 0x333333AA
#define COLOR_GOLD 0xB8860BAA
#define COLOR_RED 0xFF0000AA
#define COLOR_VERDE 0x00FF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LARANJA 0xFF9933AA
#define BLACK		        0x000000FF
#define GREEN 				0x21DD00FF
#define RED 				0xE60000FF
#define ADMIN_RED 			0xFB0000FF
#define YELLOW 				0xFFFF00FF
#define ORANGE 				0xF97804FF
#define LIGHTRED 			0xFF8080FF
#define LIGHTBLUE 			0x00C2ECFF
#define PURPLE 				0xB360FDFF
#define BLUE 				0x1229FAFF
#define LIGHTGREEN 			0x38FF06FF
#define DARKPINK 			0xE100E1FF
#define NICESKY 			0x99FFFFAA
#define GRAY 				0xCECECEFF
#define HOMER 0x33AA33AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_LIGHTBLUE 0x00D0F6AA
#define COLOR_PURPLE 0xA600F6AA
#define COLOR_TUT 0xF6C861AA
#define COLOR_ROYAL 0x00C1F6AA
#define COLOR_CWHITE 0xE0FFFFAA

#include <a_samp>

#if defined FILTERSCRIPT

forward dicamb();
forward timermb();

new moneypickup;
new Float:RandomMoney[16][3] =
{
{2654.7961,-1321.0189,62.9426},//Los Flores
{2683.1560,-1328.3214,42.8672},//Los Flores
{2683.4004,-1211.9501,66.6570},//Los Flores
{2701.0215,-1138.8977,71.3599},//Los Flores
{2528.7007,-1315.2404,38.8201},//EastLS
{2500.1082,-1321.8126,38.6685}, //EastLS
{2532.3301,-1225.8428,43.6563},//EastLS
{2481.9978,-1414.2601,28.8358},//EastLS
{1971.4669,-1284.5563,28.4919},// MBGlen1
{1976.7739,-1234.2458,20.0469}, // MBGlen2
{2045.5886,-1115.1133,26.3617}, // MBGlen3
{1855.0057,-1169.5105,23.8281},// MBGlen4
{2068.4412,-1556.7917,13.4274},// MBIdle1
{2049.9265,-1694.7319,13.5547}, // MBIdle2
{2070.8611,-1825.4065,22.4531}, // MBIdle3
{2133.4028,-1787.3102,13.5310} // MBIdle4
};

public OnFilterScriptInit()
{
    SetTimer("dicamb", 300000, 0);
    new rand = random(sizeof(RandomMoney));
    moneypickup = CreatePickup(1550, 3, RandomMoney[rand][0], RandomMoney[rand][1], RandomMoney[rand][2]);
	print("\n--------------------------------------");
	print(" Money Bag");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == moneypickup)
	{
    new str[128];
    new pName[MAX_PLAYER_NAME];
    new earnings = 10000+random(40001);
    GetPlayerName(playerid, pName, sizeof(pName));
	format(str, sizeof(str), ">>> %s achou a Money Bag! E recebeu $%d! <<<", pName, earnings);
	GameTextForPlayer(playerid, "~g~Parabens!~n~ ~w~ Voce achou a moneybag!", 5000, 3);
 	SendClientMessage(playerid, GREEN, str);
  	GivePlayerMoney(playerid, earnings);
    DestroyPickup(moneypickup);
	SetTimer("timermb", 300000, 0);
 	}
	return 1;
}

public timermb()
{
    SendClientMessageToAll(GREEN, "A Money Bag se moveu! Ache a Money Bag e receba $10000 - $50000");
    new rand = random(sizeof(RandomMoney));
    moneypickup = CreatePickup(1550, 3, RandomMoney[rand][0], RandomMoney[rand][1], RandomMoney[rand][2]);
    SetTimer("dicamb", 300000, 0);
	return 1;
}

public dicamb()
{
    new string[128];
    new rand = random(sizeof(RandomMoney));
    format(string,sizeof string, ">>> A Money Bag estб em algum lugar em %s. <<<", GetRandomHint(rand));
    SendClientMessageToAll(YELLOW, string);
	return 1;
}

stock GetRandomHint(Pickup)
{
new string[50];
switch(Pickup)
{
case 0: format(string, sizeof(string), "Los Flores");
case 1: format(string, sizeof(string), "Los Flores");
case 2: format(string, sizeof(string), "Los Flores");
case 3: format(string, sizeof(string), "Los Flores");
case 4: format(string, sizeof(string), "East Los Santos");
case 5: format(string, sizeof(string), "East Los Santos");
case 6: format(string, sizeof(string), "East Los Santos");
case 7: format(string, sizeof(string), "East Los Santos");
case 8: format(string, sizeof(string), "Glen Park");
case 9: format(string, sizeof(string), "Glen Park");
case 10: format(string, sizeof(string), "Glen Park");
case 11: format(string, sizeof(string), "Glen Park");
case 12: format(string, sizeof(string), "Idlewood");
case 13: format(string, sizeof(string), "Idlewood");
case 14: format(string, sizeof(string), "Idlewood");
case 15: format(string, sizeof(string), "Idlewood");
}
return string;
}

#endif
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)