Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===================================================================================================================//
- //============== Créditos ===============//
- //============== ===============//
- //============== [RO]Nicusor: http://forum.sa-mp.com/showthread.php?t=301149 ===============//
- //============== Killa[DGZ] Palaa: http://forum.sa-mp.com/showthread.php?t=198006&highlight=xmas+tree ===============//
- //============== [TSSA]Tiego: http://forum.sa-mp.com/member.php?u=26080 ===============//
- //============== alexcordeiro http://forum.sa-mp.com/member.php?u=139939 ===============//
- //====================================================================================================================//
- #define FILTERSCRIPT
- #include <a_samp>
- #include <cpstream>
- #include <Double-O-Icons> // < dont ask why Este is here but leave it
- #define COR_3DLABEL 0xF68E00F6
- #define GREY 0xAFAFAFAA
- #define LIGHTGREEN 0x9ACD32AA
- #if defined FILTERSCRIPT
- #define F_MAX_OBJECTS 1000
- #define UpdateTime 300 //update time in ms (milliseconds).
- #define ObjectsToStream 300
- #define StreamRange 300.0
- #pragma dynamic 30000
- #define MAX_XMASTREES 100
- forward F_ObjectUpdate(bool:DontCheckDistance);
- forward F_StartUpdate();
- enum XmasTrees
- {
- XmasTreeX,
- Float:XmasX,
- Float:XmasY,
- Float:XmasZ,
- XmasObject1,
- XmasObject2,
- XmasObject3,
- XmasObject4,
- XmasObject5,
- XmasObject6,
- XmasObject7,
- XmasObject8,
- XmasObject9,
- XmasObject10,
- };
- new Treepos[MAX_XMASTREES][XmasTrees];
- enum OInfo
- {
- ModelID,
- ObjectID[MAX_PLAYERS],
- Float:ox,
- Float:oy,
- Float:oz,
- Float:orox,
- Float:oroy,
- Float:oroz,
- Float:ovdist,
- bool:ObjectCreated[MAX_PLAYERS],
- };
- new ObjectInfo[F_MAX_OBJECTS][OInfo];
- new bool:ObjectUpdatetRunning;
- new bool:CantCreateMore;
- new bool:RefreshObjects[MAX_PLAYERS];
- new Float:OldX[MAX_PLAYERS], Float:OldY[MAX_PLAYERS], Float:OldZ[MAX_PLAYERS];
- forward TempoNeve();
- new Spawnado[MAX_PLAYERS];
- forward Mensagens();
- new pontomapa;
- new cp;
- new cppresente;
- new Menu:Natal;
- new bool:UsandoGorro[MAX_PLAYERS];
- stock DarGorro(playerid)
- {
- SetPlayerAttachedObject(playerid, 2, 19065, 15, -0.025, -0.04, 0.23, 0, 0, 270, 2, 2, 2);
- return 1;
- }
- stock RemoverGorro(playerid)
- {
- RemovePlayerAttachedObject(playerid, 2);
- return 1;
- }
- //===================================================================================================================
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, LIGHTGREEN," ");
- SendClientMessage(playerid, GREY,"* {FF0000}M{FFFFFF}E{008000}R{FF0000}R{FFFFFF}Y {008000}X{FF0000}M{FFFFFF}A{008000}S{FFFFFF} *");
- SendClientMessage(playerid, LIGHTGREEN,"* Use: /natalinfo para mais informação *");
- //===================================================================================================================
- SendClientMessage(playerid,0xFFFFFFAA, "[Natal] Esse server usa o FilterScript Natal 0.5 by [TSSA]Tiego");
- SendClientMessage(playerid,0xFFFFFFAA, "[Natal] Para ver o Menu de Natal vá até a Prefeitura");
- for(new o=0; o<60; o++) CreatePlayerObject(playerid,354,0,0,0,0,0,0);
- Spawnado[playerid] = 0;
- return 1;
- }
- //===================================================================================================================
- public OnPlayerSpawn(playerid)
- {
- AntiDeAMX();
- Spawnado[playerid] = 1;
- return 1;
- }
- //===================================================================================================================
- public OnPlayerDeath(playerid, killerid, reason)
- {
- Spawnado[playerid] = 0;
- return 1;
- }
- //===================================================================================================================
- public OnFilterScriptInit()
- {
- Create3DTextLabel("Menu de Natal\nAperte Enter Para Ver", COR_3DLABEL, 1469.750122, -1767.667236, 18.795755, 25, 0, 50);//Menu de Natal
- AddStaticPickup(1276, 1, 1469.750122, -1767.667236, 18.795755); //Menu de Natal
- Create3DTextLabel("Arena Battlefield\nAperte Enter Para Entrar", COR_3DLABEL, -1160.480224, -1219.690551, 129.218750, 25, 0, 50);//Entrada Arena Battlefield
- Create3DTextLabel("Arena Battlefield\nAperte Enter Para Sair", COR_3DLABEL, -1128.513793, 1066.245849, 1345.742675, 25, 0, 50);//Saida Arena Battlefield
- AddStaticPickup(19132, 1, -1160.480224, -1219.690551, 129.218750); //Entrada Arena X1
- AddStaticPickup(19132, 1, -1128.513793, 1066.245849, 1345.742675); //Saida Arena X1
- Create3DTextLabel("Club Dance Fazenda\nAperte Enter Para Entrar", COR_3DLABEL, -1104.886840, -1267.576782, 129.307022, 25, 0, 50);//Entrada Club Fazenda
- Create3DTextLabel("Club Dance Fazenda\nAperte Enter Para Sair", COR_3DLABEL, 493.430938, -24.339445, 1000.679687, 25, 0, 50);//Saida Club Fazenda
- AddStaticPickup(19132, 1, -1104.9026,-1267.2914,129.3068); //Entrada Club Fazenda
- AddStaticPickup(19132, 1, 493.430938, -24.339445, 1000.679687); //Saida Club Fazenda
- SetTimer("MensagemNatal", 1000, true);
- SetTimer("TempoNeve",10000,1);
- cppresente = CPS_AddCheckpoint(-685.2733,917.0217,12.0935, 3.0, 40); //CP Presente
- SetTimer("Mensagens",50000,1);
- Natal = CreateMenu("~p~Feliz ~r~Natal ~g~!!!", 1, 5, 150, 300);
- SetMenuColumnHeader(Natal, 0, "~b~Menu~w~ de~p~ Natal");
- AddMenuItem(Natal, 0, "Ir na Fazenda de natal");
- AddMenuItem(Natal, 0, "Desejar Feliz Natal");
- AddMenuItem(Natal, 0, "Buscar Presente de natal");
- AddMenuItem(Natal, 0, "Colocar Gorro de Natal");
- AddMenuItem(Natal, 0, "Retirar Gorro de Natal");
- AddMenuItem(Natal, 0, "[Sair]");
- //===================================================================================================================
- CreateObject(3917, -1190.63635254, -1199.75781250, 121.90628815, 0.00000000, 0.00000000, 180.00000000);
- CreateObject(3917, -1180.33801270, -1199.92028809, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1190.68798828, -1186.91918945, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1180.36157227, -1186.83300781, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1180.53723145, -1173.71997070, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1190.53710938, -1173.82226562, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1190.67663574, -1160.51269531, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1180.42578125, -1160.40759277, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1180.53491211, -1149.98754883, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1180.60595703, -1142.98730469, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1190.42736816, -1147.45141602, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1190.23120117, -1142.84619141, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1170.07080078, -1142.84497070, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1170.11499023, -1155.90515137, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1170.40771484, -1168.93994141, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1170.20312500, -1182.02465820, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1170.44799805, -1192.04992676, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1170.44433594, -1199.58752441, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1159.93969727, -1199.69628906, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1159.94030762, -1187.42443848, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1159.98608398, -1175.90051270, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1159.97094727, -1163.37902832, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1159.91052246, -1150.10900879, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1159.96630859, -1142.83251953, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1150.47045898, -1143.05004883, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1150.76806641, -1156.04345703, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1151.06018066, -1168.78674316, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1151.34643555, -1181.28002930, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1151.61535645, -1193.02355957, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1151.77014160, -1199.77014160, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1142.77392578, -1199.97607422, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1142.48657227, -1187.48168945, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1142.20520020, -1175.23742676, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1141.91247559, -1162.49353027, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1141.61950684, -1149.74938965, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1141.45849609, -1142.75244141, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1131.21301270, -1142.98718262, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1131.50549316, -1155.73010254, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1131.80895996, -1168.97302246, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1132.11267090, -1182.21618652, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1132.38195801, -1193.96008301, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1132.51379395, -1199.70715332, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1072.61938477, -1213.97875977, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1083.166015625, -1213.9052734375, 121.90628814697, 0, 0, 179.99450683594);
- CreateObject(3917, -1093.71289062, -1213.83203125, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1097.69726562, -1214.18359375, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1097.68261719, -1225.72656250, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1090.64404297, -1225.85839844, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1083.83203125, -1226.26123047, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1073.76123047, -1226.62695312, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1073.01367188, -1226.56103516, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1084.44677734, -1236.35302734, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1092.16601562, -1237.03369141, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1097.89355469, -1237.53857422, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1072.99121094, -1235.34082031, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1076.47753906, -1235.64843750, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1072.99707031, -1201.02832031, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1082.52587891, -1201.11621094, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1091.05810547, -1201.11621094, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1101.01586914, -1200.77880859, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1073.01428223, -1187.66052246, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1082.72241211, -1187.73315430, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1092.63537598, -1187.94860840, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1101.64721680, -1188.14477539, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1112.25646973, -1188.23718262, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1111.52868652, -1199.31799316, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1121.79016113, -1199.47180176, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1123.44653320, -1196.66406250, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1122.31201172, -1188.24682617, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1122.58666992, -1175.62866211, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1114.47473145, -1175.45104980, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1105.31896973, -1175.45861816, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1096.24414062, -1174.91333008, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1085.42919922, -1174.67724609, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1086.04357910, -1175.10632324, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1076.27246094, -1174.68432617, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1073.07739258, -1174.89135742, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1073.81860352, -1161.98388672, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1080.73059082, -1161.78930664, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1091.17419434, -1161.76708984, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1100.78637695, -1162.09350586, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1107.16870117, -1163.32421875, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1116.52636719, -1162.32897949, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1121.56457520, -1162.75683594, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1120.82043457, -1151.18029785, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1120.79162598, -1142.91381836, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1113.02416992, -1142.90979004, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1112.02209473, -1150.73999023, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1105.03515625, -1151.18701172, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1105.22399902, -1142.40563965, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1097.17199707, -1149.68579102, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1096.70812988, -1142.44970703, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1088.10937500, -1149.01318359, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1087.69360352, -1142.52539062, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1077.96240234, -1143.14904785, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1078.34570312, -1149.13671875, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1073.61657715, -1148.69836426, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(3917, -1072.87927246, -1143.10705566, 121.90628815, 0.00000000, 0.00000000, 179.99450684);
- CreateObject(687, -1036.21630859, -1351.61950684, 128.49894714, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(687, -1067.7275390625, -1339.0986328125, 128.49894714355, 0, 0, 0);
- CreateObject(3472, -1067.73339844, -1338.97900391, 126.96295166, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3472, -1067.73339844, -1338.97851562, 126.96295166, 0.00000000, 0.00000000, 173.99597168);
- CreateObject(3472, -1067.73339844, -1338.97851562, 126.96295166, 0.00000000, 0.00000000, 89.99597168);
- CreateObject(3472, -1067.73339844, -1338.97851562, 132.71295166, 0.00000000, 0.00000000, 89.99450684);
- CreateObject(3472, -1067.73339844, -1338.97851562, 132.71295166, 0.00000000, 0.00000000, 231.99453735);
- CreateObject(3472, -1067.73339844, -1338.97851562, 132.71295166, 0.00000000, 0.00000000, 33.99279785);
- CreateObject(3472, -1067.73339844, -1338.97851562, 132.71295166, 0.00000000, 0.00000000, 67.99169922);
- CreateObject(3472, -1067.73339844, -1338.97851562, 136.96295166, 0.00000000, 0.00000000, 97.98889160);
- CreateObject(3472, -1067.73339844, -1338.97851562, 136.96295166, 0.00000000, 0.00000000, 55.98706055);
- CreateObject(3472, -1067.63122559, -1338.75036621, 136.96295166, 0.00000000, 0.00000000, 119.98632812);
- CreateObject(3472, -1036.04211426, -1351.59606934, 136.96295166, 0.00000000, 0.00000000, 119.98168945);
- CreateObject(3472, -1036.04199219, -1351.59570312, 136.96295166, 0.00000000, 0.00000000, 265.98168945);
- CreateObject(3472, -1036.04199219, -1351.59570312, 136.96295166, 0.00000000, 0.00000000, 329.97900391);
- CreateObject(3472, -1036.04199219, -1351.59570312, 133.46295166, 0.00000000, 0.00000000, 53.97436523);
- CreateObject(3472, -1036.04199219, -1351.59570312, 133.46295166, 0.00000000, 0.00000000, 125.97033691);
- CreateObject(3472, -1036.04199219, -1351.59570312, 133.46295166, 0.00000000, 0.00000000, 219.96923828);
- CreateObject(3472, -1036.04199219, -1351.59570312, 128.21295166, 0.00000000, 0.00000000, 219.96826172);
- CreateObject(3472, -1036.04199219, -1351.59570312, 128.21295166, 0.00000000, 0.00000000, 13.96826172);
- CreateObject(3472, -1036.04199219, -1351.59570312, 128.21295166, 0.00000000, 0.00000000, 113.96118164);
- CreateObject(18102, -1099.3994140625, -1241.099609375, 135, 358.00048828125, 357.98950195313, 169.92553710938);
- CreateObject(18102, -1110.3000488281, -1246.3000488281, 135, 358.00048828125, 357.98950195313, 5.9295654296875);
- CreateObject(3472, -1036.04199219, -1351.59570312, 128.21295166, 0.00000000, 0.00000000, 67.96118164);
- CreateObject(3472, -1067.73339844, -1338.97851562, 126.96295166, 0.00000000, 0.00000000, 149.99597168);
- CreateObject(3666, -1065.15795898, -1290.16271973, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1065.11682129, -1286.20910645, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1065.21496582, -1282.71008301, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1065.28833008, -1279.20996094, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1065.37731934, -1274.95996094, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1065.45043945, -1271.45996094, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1065.52893066, -1267.70996094, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1065.62280273, -1263.20996094, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1065.69555664, -1259.70996094, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1065.78979492, -1255.20996094, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1069.28906250, -1255.28344727, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1073.03906250, -1255.36193848, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1077.03906250, -1255.44531250, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1081.28906250, -1255.53454590, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1085.28906250, -1255.61816406, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1088.78906250, -1255.69165039, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1088.86779785, -1251.94140625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1088.95117188, -1247.94140625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1088.28002930, -1244.15698242, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1088.33874512, -1241.38757324, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1088.65673828, -1238.14282227, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1088.47534180, -1234.86853027, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1087.81018066, -1233.08898926, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1088.51843262, -1220.55761719, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1033.65856934, -1219.31774902, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1033.18408203, -1222.94055176, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1033.20922852, -1230.69409180, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.90429688, -1234.62988281, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1033.68652344, -1239.06176758, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1033.08898926, -1242.72302246, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1033.05957031, -1246.47265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1033.02246094, -1251.22265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.98535156, -1255.97265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.94628906, -1260.97265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.91308594, -1265.22265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.87597656, -1269.97265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.83886719, -1274.72265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.79980469, -1279.72265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.76269531, -1284.47265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.72558594, -1289.22265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.68457031, -1294.47265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.64355469, -1299.72265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.59863281, -1305.47265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.55175781, -1311.47265625, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3666, -1032.37805176, -1314.73059082, 129.85032654, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(1262, -1068.38781738, -1300.62451172, 128.97836304, 0.00000000, 0.00000000, 278.00000000);
- CreateObject(1262, -1068.38769531, -1300.62402344, 130.72836304, 0.00000000, 0.00000000, 277.99804688);
- CreateObject(1262, -1068.61108398, -1296.88134766, 132.72836304, 0.00000000, 0.00000000, 277.99804688);
- CreateObject(1262, -1068.77453613, -1301.09411621, 128.97836304, 0.00000000, 0.00000000, 277.99804688);
- CreateObject(1262, -1068.77441406, -1301.09375000, 130.47836304, 0.00000000, 0.00000000, 277.99804688);
- CreateObject(1262, -1062.19970703, -1231.57263184, 128.97836304, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(1262, -1064.18457031, -1231.32714844, 128.97836304, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(1262, -1067.16259766, -1230.95947266, 128.97836304, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(1262, -1070.14013672, -1230.59130859, 128.97836304, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(1262, -1072.12500000, -1230.34570312, 128.97836304, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(1262, -1074.91613770, -1230.50500488, 128.97836304, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(1262, -1077.76843262, -1231.16052246, 128.97836304, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(1262, -1080.86816406, -1231.78515625, 128.97836304, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(1262, -1084.43444824, -1232.10070801, 128.97836304, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(1262, -1088.27868652, -1232.63366699, 128.97836304, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(1262, -1087.58276367, -1220.87695312, 128.97836304, 0.00000000, 0.00000000, 188.00000000);
- CreateObject(1262, -1085.59667969, -1221.12207031, 128.97836304, 0.00000000, 0.00000000, 187.99804688);
- CreateObject(1262, -1082.61865234, -1221.48974609, 128.97836304, 0.00000000, 0.00000000, 187.99804688);
- CreateObject(1262, -1081.06787109, -1221.17675781, 128.97836304, 0.00000000, 0.00000000, 187.99804688);
- CreateObject(1262, -1079.33020020, -1221.39123535, 128.97836304, 0.00000000, 0.00000000, 187.99804688);
- CreateObject(1262, -1076.84838867, -1221.69702148, 128.97836304, 0.00000000, 0.00000000, 187.99804688);
- CreateObject(1262, -1073.37329102, -1222.12524414, 128.97836304, 0.00000000, 0.00000000, 187.99804688);
- CreateObject(1262, -1069.89868164, -1222.55395508, 128.97836304, 0.00000000, 0.00000000, 187.99804688);
- CreateObject(1262, -1067.16857910, -1222.89074707, 128.97836304, 0.00000000, 0.00000000, 187.99804688);
- CreateObject(1262, -1064.43811035, -1223.22766113, 128.97836304, 0.00000000, 0.00000000, 187.99804688);
- CreateObject(1262, -1061.70764160, -1223.56457520, 128.97836304, 0.00000000, 0.00000000, 187.99804688);
- CreateObject(9078, -1128.7890625, -1173.0283203125, 124.58159637451, 0, 0, 25.999145507813);
- CreateObject(8620, -1091.4248046875, -1226.3581542969, 115.2222366333, 0, 0, 90);
- CreateObject(664, -1151.88476562, -1174.30664062, 126.38721466, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3096, -1173.20080566, -1177.91247559, 141.87153625, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3096, -1169.67114258, -1163.59423828, 141.87153625, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3096, -1154.60815430, -1156.65649414, 142.12153625, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3096, -1139.33203125, -1159.65039062, 142.12153625, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3096, -1131.57128906, -1169.04809570, 142.12153625, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3096, -1132.92846680, -1182.88232422, 142.12153625, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3096, -1147.50976562, -1191.15380859, 142.12153625, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3096, -1162.60595703, -1189.35949707, 142.12153625, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3472, -1151.73950195, -1174.29028320, 154.52488708, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3472, -1151.73925781, -1174.29003906, 154.52488708, 0.00000000, 0.00000000, 170.00000000);
- CreateObject(3472, -1151.73925781, -1174.29003906, 149.77488708, 0.00000000, 314.00000000, 169.99694824);
- CreateObject(3472, -1151.73925781, -1174.29003906, 149.77488708, 0.00000000, 349.99468994, 169.99145508);
- CreateObject(3472, -1151.73925781, -1174.29003906, 149.77488708, 318.78033447, 346.64096069, 161.09759521);
- CreateObject(3472, -1151.73925781, -1174.29003906, 149.77488708, 47.03942871, 345.22506714, 180.91130066);
- CreateObject(3472, -1151.73925781, -1174.29003906, 149.77488708, 10.36413574, 80.52099609, 122.84490967);
- CreateObject(3472, -1151.73925781, -1174.29003906, 149.77488708, 10.36010742, 80.51879883, 172.84375000);
- CreateObject(3472, -1151.73925781, -1174.29003906, 149.77488708, 44.95755005, 25.88012695, 219.03923035);
- CreateObject(3472, -1151.83325195, -1175.53637695, 149.77488708, 44.95605469, 25.87829590, 265.03448486);
- CreateObject(3472, -1151.83300781, -1175.53613281, 149.77488708, 64.74838257, 46.38702393, 298.44284058);
- CreateObject(3472, -1151.83300781, -1175.53613281, 149.77488708, 64.74792480, 46.38427734, 2.43807983);
- CreateObject(3472, -1149.78845215, -1174.59790039, 149.77488708, 64.74243164, 46.37878418, 76.43344116);
- CreateObject(3534, -1149.70471191, -1174.71679688, 136.84570312, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3534, -1152.95410156, -1174.66601562, 136.84570312, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3534, -1151.46582031, -1175.43945312, 136.84570312, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3534, -1151.42675781, -1172.93945312, 136.84570312, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(3877, -1151.08776855, -1174.43359375, 143.92984009, 87.17187500, 314.98300171, 44.98211670);
- CreateObject(3877, -1151.08691406, -1174.43359375, 142.17984009, 87.17102051, 314.97802734, 44.97802734);
- CreateObject(3877, -1151.08691406, -1174.43359375, 139.17984009, 87.17102051, 314.97802734, 44.97802734);
- CreateObject(3877, -1151.58300781, -1174.49584961, 139.17984009, 87.17105103, 314.97787476, 322.97817993);
- CreateObject(3877, -1151.58300781, -1174.49511719, 141.17984009, 87.17102051, 314.97253418, 322.97607422);
- CreateObject(3877, -1151.58300781, -1174.49511719, 142.42984009, 87.17102051, 314.97253418, 322.97607422);
- CreateObject(3877, -1151.58300781, -1174.49511719, 145.92984009, 87.17102051, 314.97253418, 322.97607422);
- CreateObject(3877, -1151.58300781, -1174.49511719, 146.92984009, 87.17105103, 314.97256470, 210.97602844);
- CreateObject(3877, -1151.58300781, -1174.49511719, 144.17984009, 87.17102051, 314.97253418, 210.97595215);
- CreateObject(3877, -1151.58300781, -1174.49511719, 140.42984009, 87.17102051, 314.97253418, 210.97595215);
- CreateObject(3877, -1151.58300781, -1174.49511719, 137.92984009, 87.17102051, 314.97253418, 210.97595215);
- CreateObject(3877, -1151.58300781, -1174.49511719, 137.92984009, 87.17105103, 314.97256470, 130.97589111);
- CreateObject(3877, -1151.58300781, -1174.49511719, 140.17984009, 87.17102051, 314.97253418, 130.97351074);
- CreateObject(3877, -1151.58300781, -1174.49511719, 143.17984009, 87.17102051, 314.97253418, 130.97351074);
- CreateObject(3877, -1151.58300781, -1174.49511719, 147.17984009, 87.17102051, 314.97253418, 130.97351074);
- CreateObject(3877, -1151.58300781, -1174.49511719, 149.67984009, 87.17102051, 314.97253418, 130.97351074);
- CreateObject(7666, -1151.62731934, -1174.65588379, 175.60897827, 0.00000000, 0.00000000, 0.00000000);
- CreateObject(7666, -1151.62695312, -1174.65527344, 175.60897827, 0.00000000, 0.00000000, 84.00000000);
- CreateObject(7666, -1151.62695312, -1174.65527344, 175.60897827, 0.00000000, 0.00000000, 131.99597168);
- CreateObject(7666, -1151.62695312, -1174.65527344, 175.60897827, 0.00000000, 0.00000000, 205.99523926);
- CreateObject(7666, -1151.62695312, -1174.65527344, 175.60897827, 0.00000000, 0.00000000, 231.99365234);
- CreateObject(8882, -1235.4000244141, -1186.0999755859, 146.10000610352, 0, 0, 208);
- CreateObject(8881, -1195.5, -1127.4000244141, 139.60000610352, 0, 0, 116);
- CreateObject(6994, -1110.69921875, -1247.2998046875, 137, 0, 0, 270);
- CreateObject(16442, -1075.5999755859, -1252.1999511719, 129.60000610352, 0, 0, 341.99829101563);
- CreateObject(16442, -1063, -1240.9000244141, 129.60000610352, 0, 0, 223.99340820313);
- CreateObject(16442, -1077.4000244141, -1243.9000244141, 129.89999389648, 0, 0, 29.993408203125);
- CreateObject(6299, -1060.0999755859, -1213, 130, 0, 0, 0);
- CreateObject(5716, -1109.8000488281, -1276.9000244141, 141.60000610352, 0, 0, 180);
- CreateObject(2898, -1090.1999511719, -1258.6999511719, 128.30000305176, 0, 0, 0);
- CreateObject(2898, -1094.0999755859, -1258.6999511719, 128.30000305176, 0, 0, 0);
- CreateObject(2898, -1098.0999755859, -1258.6999511719, 128.30000305176, 0, 0, 0);
- CreateObject(16146, -1156.9000244141, -1229.0999755859, 131.60000610352, 0, 0, 270);
- CreateObject(10150, -1161.3000488281, -1220.5999755859, 130.30000305176, 0, 0, 90);
- //===================================================================================================================
- print("\n---------------------------------------");
- print(" FilterScript ~ Natal De [BMV]Alex_Staff");
- print("---------------------------------------\n");
- return 1;
- }
- //===================================================================================================================
- public OnPlayerEnterCheckpoint(playerid)
- {
- cp = CPS_GetPlayerCheckpoint(playerid);
- if(cp == cppresente)
- {
- SpawnPlayer(playerid);
- new string[256];
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "[Natal] %s acaba de achar o Presente de Natal [Menu na Prefeitura]", pname);
- SendClientMessageToAll(0xFF4500AA, string); SetPlayerFacingAngle(playerid, 270);
- GameTextForPlayer(playerid,"~y~P~g~R~b~E~y~S~g~E~b~N~y~T~g~E", 1000, 1);
- SendClientMessage(playerid,0xFFFFFFAA, "[Natal] Aqui está seu Presente! Feliz Natal!");
- GivePlayerMoney(playerid, 50000);
- DisablePlayerCheckpoint(playerid);
- DisablePlayerCheckpoint(pontomapa);
- TogglePlayerControllable(playerid, 1);
- }
- return 1;
- }
- //===================================================================================================================
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp(cmdtext,"/natalinfo",true) == 0)
- {
- SendClientMessage(playerid, LIGHTGREEN," * Árvores de Natal *");
- SendClientMessage(playerid, GREY,"* Use: /criararvore para criar uma arvore de natal *");
- SendClientMessage(playerid, GREY,"* Use: /deletararvore para deletar a arvore de natal mais proxima *");
- // SendClientMessage(playerid, GREY,"* Use: /deletartodasarvores para deletar todas arvores de natal *");// not unless you want ppl deleting your trees
- SendClientMessage(playerid, GREY,"* Use: /natalcreditos para os creditos deste FS *");
- return 1;
- }
- if (strcmp(cmdtext,"/natalcreditos",true) == 0)
- {
- SendClientMessage(playerid, LIGHTGREEN," * Créditos Árvores de Natal *");
- SendClientMessage(playerid, GREY,"* Agradecimento especial para o para a equipe de SA-MP por novos objetos *");
- SendClientMessage(playerid, GREY,"* Árvores de Natal[FS] Foi criado por Killa[DGZ] 11-12-2010 *");
- SendClientMessage(playerid, GREY,"* Este [FS] usa Streamer Fallout objeto criado por Fallout *");
- SendClientMessage(playerid, GREY,"* Este [FS] também usa Double-O-Icons por Double-O-Seven *");
- return 1;
- }
- if(strcmp(cmdtext, "/criararvore", true) == 0)
- {
- new Float:plocx,Float:plocy,Float:plocz;
- GetPlayerPos(playerid, plocx, plocy, plocz);
- SetXmasTree(plocx,plocy,plocz);
- SetPlayerPos(playerid, plocx-2.5, plocy+2.5, plocz);//so you dont get stuck in the presents
- return 1;
- }
- if(strcmp(cmdtext, "/deletararvore", true) == 0)
- {
- DeleteClosestXmasTree(playerid);
- return 1;
- }
- if(strcmp(cmdtext, "/deletartodasarvores", true) == 0)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "(*) Você não é um administrador conectado na RCON.");
- DeleteAllXmasTree();
- return 1;
- }
- //===================================================================================================================
- if(strcmp(cmdtext,"/NatalBMV",true)==0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 1469.750122, -1767.667236, 18.795755))
- {
- TogglePlayerControllable(playerid, 0);
- ShowMenuForPlayer(Natal,playerid);
- SendClientMessage(playerid,0xFFFFFFAA, "Use: Também /natalinfo e /natalcreditos!");
- return 1;
- }
- }
- //===================================================================================================================
- if (strcmp("/entrarclub", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1104.886840, -1267.576782, 129.307022))
- {
- PlayAudioStreamForPlayer(playerid, "http://174.36.241.224:10018");
- GameTextForPlayer(playerid, "~w~Club Dance~g~ Fazenda", 5000, 6);
- SetPlayerPos(playerid, 493.144287, -24.260700, 1000.679687);
- SetPlayerFacingAngle(playerid, 356.986358);
- SetPlayerInterior(playerid, 17);
- return 1;
- }
- }
- //===================================================================================================================
- if (strcmp("/sairclub", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, 493.430938, -24.339445, 1000.679687))
- {
- StopAudioStreamForPlayer(playerid);
- SetPlayerPos(playerid, -1104.9213,-1268.2100,129.3077);
- SetPlayerFacingAngle(playerid, 7.0520);
- SetPlayerInterior(playerid, 0);
- return 1;
- }
- }
- //===================================================================================================================
- if (strcmp("/entrararenax1", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1160.480224, -1219.690551, 129.218750))
- {
- PlayAudioStreamForPlayer(playerid, "http://cdn.battlefieldheroes.com/static/20120820100012/images/audio/battlefield-heroes-theme.mp3");
- GameTextForPlayer(playerid, "~w~Arena~g~ Battlefield", 5000, 6);
- SetPlayerPos(playerid, -1127.7219,1066.4594,1345.7377);
- SetPlayerFacingAngle(playerid, 273.1107);
- SetPlayerInterior(playerid, 10);
- GivePlayerWeapon(playerid, 24, 999);
- GivePlayerWeapon(playerid, 25, 999);
- GivePlayerWeapon(playerid, 31, 999);
- GivePlayerWeapon(playerid, 29, 999);
- GivePlayerWeapon(playerid, 34, 999);
- SetPlayerArmour(playerid, 100);
- SetPlayerHealth(playerid, 100);
- return 1;
- }
- }
- //===================================================================================================================
- if (strcmp("/sortearplayer", cmdtext, true, 10) == 0)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "(*) Você não é um administrador conectado na RCON.");
- new string[256];
- new onlineids[MAX_PLAYERS]; // to store all online playerids
- new playersonline; // to store the amount of current online players
- new pname[MAX_PLAYER_NAME]; // to store the chosen player's name
- for(new i=0; i<MAX_PLAYERS; i++) // loop through max amount of players (hopefully redefined from default!)
- {
- if(IsPlayerConnected(i)) // check to see if current id in the loop is connected
- {
- onlineids[playersonline] = i; // store the current id into the onlineids variable
- playersonline++; // increase the playersonline by 1
- }
- }
- GetPlayerName(onlineids[random(playersonline)], pname, sizeof(string)); // use the random function to randomly select a store online id
- format(string, sizeof(string), "[Natal] %s Ganhou Conta Vip por 1 Mês]", pname);
- SendClientMessageToAll(0xFF4500AA, string);
- return 1;
- }
- //===================================================================================================================
- if (strcmp("/sairarenax1", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, -1128.513793, 1066.245849, 1345.742675))
- {
- StopAudioStreamForPlayer(playerid);
- SetPlayerPos(playerid, -1160.3730,-1219.0618,129.2188);
- SetPlayerFacingAngle(playerid, 3.1986);
- SetPlayerInterior(playerid, 0);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- }
- return 0;
- }
- //===================================================================================================================
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- new string[256];
- new Menu:current;
- current = GetPlayerMenu(playerid);
- if(current == Natal)
- {
- switch(row)
- {
- case 0:
- {
- TogglePlayerControllable(playerid, 1);
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "[Natal] %s foi Festejar o Natal na Fazenda vá você também[Menu na Prefeitura]", pname);
- SendClientMessageToAll(0xFF4500AA, string);
- SetPlayerPos(playerid,-1052.6349,-1346.8374,130.0952);
- GameTextForPlayer(playerid,"~y~Bem ~g~vindo(a) ~y~a ~g~Fazenda ~r~Natalina ~w~!", 1000, 1);
- SendClientMessage(playerid,0xFFFFFFAA, "[Natal] Bem vindo(a) à Fazenda Natalina!");
- }
- case 1:
- {
- TogglePlayerControllable(playerid, 1);
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "[Natal] %s deseja um Feliz Natal à todos do server BMV!", pname);
- SendClientMessageToAll(0xFF4500AA, string);
- }
- case 2:
- {
- TogglePlayerControllable(playerid, 1);
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "[Natal] %s foi procurar pelo presente de Natal! [Menu na Prefeitura]", pname);
- SendClientMessageToAll(0xFF4500AA, string);
- pontomapa = SetPlayerCheckpoint(playerid,-685.2733,917.0217,12.0935,2.0);
- SendClientMessage(playerid,0xFFFFFFAA, "[Natal] Vá até o ponto vermelho do Mapa para conseguir seu presente!");
- }
- case 3:
- {
- TogglePlayerControllable(playerid, 1);
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "[Natal] %s Colocou um gorro de Natal! [Menu na Prefeitura]", pname);
- SendClientMessageToAll(0xFF4500AA, string);
- if(UsandoGorro[playerid]) return SendClientMessage(playerid, -1, "[Natal] Você já está usando o gorro!");
- SendClientMessage(playerid, -1, "Agora você está usando o gorro!");
- DarGorro(playerid);
- UsandoGorro[playerid] = true;
- }
- case 4:
- {
- TogglePlayerControllable(playerid, 1);
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
- format(string, sizeof(string), "[Natal] %s Retirou o gorro de Natal! [Menu na Prefeitura]", pname);
- SendClientMessageToAll(0xFF4500AA, string);
- if(!UsandoGorro[playerid]) return SendClientMessage(playerid, -1, "[Natal] Você não está usando o gorro!");
- SendClientMessage(playerid, -1, "Agora você não está mais usando o gorro!");
- RemoverGorro(playerid);
- UsandoGorro[playerid] = false;
- }
- case 5:
- {
- OnPlayerExitedMenu(playerid);
- }
- }
- }
- return 1;
- }
- //===================================================================================================================
- public OnPlayerExitedMenu(playerid)
- {
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- //===================================================================================================================
- public Mensagens()
- {
- new Mensagem=random(2);
- if (Mensagem == 0)
- {
- }
- else if (Mensagem == 1)
- {
- SendClientMessageToAll(0xFFFFFFAA, "[Natal] Para ver o Menu de Natal vá até a Prefeitura");
- }
- return 1;
- }
- //===================================================================================================================
- public TempoNeve()
- {
- for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i) && Spawnado[i] == 1)
- {
- SetWorldTime(24);
- new Float:Pos[3],Float:pObjectPos[3];
- GetPlayerPos(i,Pos[0],Pos[1],Pos[2]);
- for(new b=0; b<60; b++)
- {
- if(b < 20) SetPlayerObjectPos(i,b,Pos[0]+random(40)-4,Pos[1],Pos[2]+30);
- if(b < 40 && b > 20) SetPlayerObjectPos(i,b,Pos[0]-random(30)+3,Pos[1],Pos[2]+30);
- if(b < 50 && b > 40) SetPlayerObjectPos(i,b,Pos[0],Pos[1]+random(37)-2,Pos[2]+30);
- if(b > 50) SetPlayerObjectPos(i,b,Pos[0],Pos[1]-random(39)+2,Pos[2]+30);
- GetPlayerObjectPos(i,b,pObjectPos[0],pObjectPos[1],pObjectPos[2]);
- MovePlayerObject(i,b,pObjectPos[0],pObjectPos[1],Pos[2],5);
- }
- }
- return 1;
- }
- //===================================================================================================================
- forward MensagemNatal();
- public MensagemNatal()
- {
- new Tempo[6];
- getdate(Tempo[0], Tempo[1], Tempo[2]);
- gettime(Tempo[3], Tempo[4], Tempo[5]);
- if(Tempo[1] == 12 && Tempo[2] == 24)
- for(new i = 0; i < MAX_PLAYERS; i++){
- if(Tempo[3] == 23 && Tempo[4] == 59 && Tempo[5] == 59)
- {
- ResetPlayerWeapons(i);
- RemovePlayerFromVehicle(i);
- SetPlayerAttachedObject(i, 2, 19065, 15, -0.025, -0.04, 0.23, 0, 0, 270, 2, 2, 2);
- PlayAudioStreamForPlayer(i, "http://www.musicacomrequinte.com.br/modules/mp3player/cd/O%20Senhor%20esta%20aqui/9-noite%20feliz.mp3");
- SetPlayerPos(i, -1097.4542,-1168.0835,129.2188);
- GameTextForAll("~g~~h~FELIZ NATAL E UM PROSPERO ANO-NOVO !", 5000, 6);
- }
- }
- return true;
- }
- //===================================================================================================================
- public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
- {
- if ((newkeys==KEY_SECONDARY_ATTACK)) // Key ( F / Enter )
- {
- OnPlayerCommandText(playerid,"/NatalBMV"); // Ao Apertar "F" Funcionará o Comando Do Lado.
- OnPlayerCommandText(playerid,"/entrarclub"); // Ao Apertar "F" Funcionará o Comando Do Lado.
- OnPlayerCommandText(playerid,"/sairclub"); // Ao Apertar "F" Funcionará o Comando Do Lado.
- OnPlayerCommandText(playerid,"/entrararenax1"); // Ao Apertar "F" Funcionará o Comando Do Lado.
- OnPlayerCommandText(playerid,"/sairarenax1"); // Ao Apertar "F" Funcionará o Comando Do Lado.
- // Se Quiser Colocar mais, a vontade.
- }
- }
- //===================================================================================================================
- AntiDeAMX()
- {
- new a[][] =
- {
- "Unarmed (Fist)",
- "Brass K"
- };
- #pragma unused a
- }
- //===================================================================================================================
- public F_StartUpdate()
- {
- SetTimer("F_ObjectUpdate", UpdateTime, 1);
- }
- stock F_CreateObject(modelid, Float:x, Float:y, Float:z, Float:rox, Float:roy, Float:roz, Float:vdist=0.0)
- {
- if(ObjectUpdatetRunning == false)
- {
- SetTimer("F_StartUpdate", F_MAX_OBJECTS/2, 0);
- ObjectUpdatetRunning = true;
- }
- new objectid;
- if(CantCreateMore == false)
- {
- for(new i; i<F_MAX_OBJECTS; i++)
- {
- if(i == F_MAX_OBJECTS-1)
- {
- printf("Only the first %i objects could be created - object limit exceeded.", F_MAX_OBJECTS);
- CantCreateMore = true;
- }
- if(ObjectInfo[i][ModelID] == 0)
- {
- objectid = i;
- break;
- }
- }
- }
- else
- {
- return -1;
- }
- if(modelid == 0)
- {
- printf("Invalid modelid for object %i", objectid);
- return -1;
- }
- ObjectInfo[objectid][ModelID] = modelid;
- ObjectInfo[objectid][ox] = x;
- ObjectInfo[objectid][oy] = y;
- ObjectInfo[objectid][oz] = z;
- ObjectInfo[objectid][orox] = rox;
- ObjectInfo[objectid][oroy] = roy;
- ObjectInfo[objectid][oroz] = roz;
- ObjectInfo[objectid][ovdist] = vdist;
- return objectid;
- }
- stock F_IsValidObject(objectid)
- {
- if(ObjectInfo[objectid][ModelID] == 0 || objectid == -1)
- {
- return 0;
- }
- return 1;
- }
- stock F_DestroyObject(objectid)
- {
- if(F_IsValidObject(objectid))
- {
- for(new playerid; playerid<MAX_PLAYERS; playerid++)
- {
- if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && ObjectInfo[objectid][ObjectCreated][playerid] == true)
- {
- DestroyPlayerObject(playerid, ObjectInfo[objectid][ObjectID][playerid]);
- ObjectInfo[objectid][ObjectCreated][playerid] = false;
- }
- }
- ObjectInfo[objectid][ModelID] = 0;
- return 1;
- }
- return 0;
- }
- stock F_MoveObject(objectid, Float:x, Float:y, Float:z, Float:speed)
- {
- if(F_IsValidObject(objectid))
- {
- new time;
- for(new playerid; playerid<MAX_PLAYERS; playerid++)
- {
- if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && ObjectInfo[objectid][ObjectCreated][playerid] == true)
- {
- time = MovePlayerObject(playerid, ObjectInfo[objectid][ObjectID][playerid], x, y, z, speed);
- }
- }
- return time;
- }
- return 0;
- }
- stock F_StopObject(objectid)
- {
- if(F_IsValidObject(objectid))
- {
- for(new playerid; playerid<MAX_PLAYERS; playerid++)
- {
- if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && ObjectInfo[objectid][ObjectCreated][playerid] == true)
- {
- StopPlayerObject(playerid, ObjectInfo[objectid][ObjectID][playerid]);
- }
- }
- return 1;
- }
- return 0;
- }
- stock F_SetObjectPos(objectid, Float:x, Float:y, Float:z)
- {
- if(F_IsValidObject(objectid))
- {
- ObjectInfo[objectid][ox] = x;
- ObjectInfo[objectid][oy] = y;
- ObjectInfo[objectid][oz] = z;
- for(new playerid; playerid<MAX_PLAYERS; playerid++)
- {
- if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && ObjectInfo[objectid][ObjectCreated][playerid] == true)
- {
- SetPlayerObjectPos(playerid, ObjectInfo[objectid][ObjectID][playerid], x, y, z);
- }
- }
- return 1;
- }
- return 0;
- }
- stock F_GetObjectPos(objectid, &Float:x, &Float:y, &Float:z)
- {
- if(F_IsValidObject(objectid))
- {
- x = ObjectInfo[objectid][ox];
- y = ObjectInfo[objectid][oy];
- z = ObjectInfo[objectid][oz];
- return 1;
- }
- else
- {
- return 0;
- }
- }
- stock F_SetObjectRot(objectid, Float:rox, Float:roy, Float:roz)
- {
- if(F_IsValidObject(objectid))
- {
- ObjectInfo[objectid][orox] = rox;
- ObjectInfo[objectid][oroy] = roy;
- ObjectInfo[objectid][oroz] = roz;
- for(new playerid; playerid<MAX_PLAYERS; playerid++)
- {
- if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid) && ObjectInfo[objectid][ObjectCreated][playerid] == true)
- {
- SetPlayerObjectRot(playerid, ObjectInfo[objectid][ObjectID][playerid], rox, roy, roz);
- }
- }
- return 1;
- }
- return 0;
- }
- stock F_GetObjectRot(objectid, &Float:rox, &Float:roy, &Float:roz)
- {
- if(F_IsValidObject(objectid))
- {
- rox = ObjectInfo[objectid][orox];
- roy = ObjectInfo[objectid][oroy];
- roz = ObjectInfo[objectid][oroz];
- return 1;
- }
- else
- {
- return 0;
- }
- }
- stock F_RefreshObjects(playerid)
- {
- if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
- {
- RefreshObjects[playerid] = true;
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- F_PlayerObjectUpdate(playerid, x, y, z);
- return 1;
- }
- return 0;
- }
- stock F_Streamer_OnPlayerConnect(playerid)
- {
- for(new objectid; objectid<F_MAX_OBJECTS; objectid++)
- {
- ObjectInfo[objectid][ObjectCreated][playerid] = false;
- }
- OldX[playerid] = 999999999.99;
- OldY[playerid] = 999999999.99;
- OldZ[playerid] = 999999999.99;
- RefreshObjects[playerid] = false;
- return 1;
- }
- public F_ObjectUpdate(bool:DontCheckDistance)
- {
- new Float:ObjDistance[F_MAX_OBJECTS];
- new Closest[ObjectsToStream];
- new ObjectArr[F_MAX_OBJECTS];
- new nr;
- new bool:Firstloop;
- new bool:DontDestroy[F_MAX_OBJECTS];
- for(new playerid; playerid<MAX_PLAYERS; playerid++)
- {
- if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
- {
- if(!IsPlayerInRangeOfPoint(playerid, 1.0, OldX[playerid], OldY[playerid], OldZ[playerid]) || DontCheckDistance)
- {
- GetPlayerPos(playerid, OldX[playerid], OldY[playerid], OldZ[playerid]);
- nr = 0;
- for(new objectid; objectid<F_MAX_OBJECTS; objectid++)
- {
- if(F_IsValidObject(objectid))
- {
- ObjDistance[objectid] = floatsqroot(floatpower(floatsub(ObjectInfo[objectid][ox],OldX[playerid]),2)+floatpower(floatsub(ObjectInfo[objectid][oy],OldY[playerid]),2)+floatpower(floatsub(ObjectInfo[objectid][oz],OldZ[playerid]),2));
- if(floatcmp(ObjDistance[objectid], StreamRange) == -1)
- {
- ObjectArr[nr] = objectid;
- nr++;
- }
- }
- }
- Closest = "";
- if(nr > ObjectsToStream)
- {
- for(new loop; loop<ObjectsToStream; loop++)
- {
- Firstloop = true;
- for(new objectid; objectid<nr; objectid++)
- {
- if((ObjDistance[ObjectArr[objectid]] != 999999999.99) && ((floatcmp(ObjDistance[ObjectArr[objectid]], ObjDistance[Closest[loop]]) == -1) || Firstloop))
- {
- Firstloop = false;
- Closest[loop] = ObjectArr[objectid];
- }
- }
- ObjDistance[Closest[loop]] = 999999999.99;
- }
- }
- else
- {
- for(new objectid; objectid<nr; objectid++)
- {
- Closest[objectid] = ObjectArr[objectid];
- }
- }
- for(new objectid; objectid<F_MAX_OBJECTS; objectid++) { DontDestroy[objectid] = false; }
- for(new objectid; objectid<ObjectsToStream && objectid<nr; objectid++)
- {
- DontDestroy[Closest[objectid]] = true;
- }
- for(new objectid; objectid<F_MAX_OBJECTS; objectid++)
- {
- if(ObjectInfo[objectid][ObjectCreated][playerid] == true && DontDestroy[objectid] == false)
- {
- DestroyPlayerObject(playerid, ObjectInfo[objectid][ObjectID][playerid]);
- ObjectInfo[objectid][ObjectCreated][playerid] = false;
- }
- }
- for(new loop; loop<ObjectsToStream && loop<nr; loop++)
- {
- if(ObjectInfo[Closest[loop]][ObjectCreated][playerid] == false)
- {
- ObjectInfo[Closest[loop]][ObjectID][playerid] = CreatePlayerObject(playerid, ObjectInfo[Closest[loop]][ModelID], ObjectInfo[Closest[loop]][ox], ObjectInfo[Closest[loop]][oy], ObjectInfo[Closest[loop]][oz], ObjectInfo[Closest[loop]][orox], ObjectInfo[Closest[loop]][oroy], ObjectInfo[Closest[loop]][oroz], ObjectInfo[Closest[loop]][ovdist]);
- ObjectInfo[Closest[loop]][ObjectCreated][playerid] = true;
- }
- }
- }
- }
- }
- }
- stock F_ObjectUpdateForAll()
- {
- F_ObjectUpdate(true);
- }
- stock F_PlayerObjectUpdate(playerid, Float:x, Float:y, Float:z)
- {
- if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
- {
- OldX[playerid] = x;
- OldY[playerid] = y;
- OldZ[playerid] = z;
- new nr;
- new Float:ObjDistance[F_MAX_OBJECTS];
- new ObjectArr[F_MAX_OBJECTS];
- for(new objectid; objectid<F_MAX_OBJECTS; objectid++)
- {
- if(F_IsValidObject(objectid))
- {
- ObjDistance[objectid] = floatsqroot(floatpower(floatsub(ObjectInfo[objectid][ox],x),2)+floatpower(floatsub(ObjectInfo[objectid][oy],y),2)+floatpower(floatsub(ObjectInfo[objectid][oz],z),2));
- if(floatcmp(ObjDistance[objectid], StreamRange) == -1)
- {
- ObjectArr[nr] = objectid;
- nr++;
- }
- }
- }
- new Closest[ObjectsToStream];
- if(nr > ObjectsToStream)
- {
- for(new loop; loop<ObjectsToStream; loop++)
- {
- new bool:Firstloop = true;
- for(new objectid; objectid<nr; objectid++)
- {
- if((ObjDistance[ObjectArr[objectid]] != 999999999.99) && ((floatcmp(ObjDistance[ObjectArr[objectid]], ObjDistance[Closest[loop]]) == -1) || Firstloop))
- {
- Firstloop = false;
- Closest[loop] = ObjectArr[objectid];
- }
- }
- ObjDistance[Closest[loop]] = 999999999.99;
- }
- }
- else
- {
- for(new objectid; objectid<nr; objectid++)
- {
- Closest[objectid] = ObjectArr[objectid];
- }
- }
- new bool:DontDestroy[F_MAX_OBJECTS];
- for(new objectid; objectid<ObjectsToStream && objectid<nr; objectid++)
- {
- DontDestroy[Closest[objectid]] = true;
- }
- for(new objectid; objectid<F_MAX_OBJECTS; objectid++)
- {
- if(ObjectInfo[objectid][ObjectCreated][playerid] == true && (DontDestroy[objectid] == false || RefreshObjects[playerid] == true))
- {
- DestroyPlayerObject(playerid, ObjectInfo[objectid][ObjectID][playerid]);
- ObjectInfo[objectid][ObjectCreated][playerid] = false;
- }
- }
- RefreshObjects[playerid] = false;
- for(new loop; loop<ObjectsToStream && loop<nr; loop++)
- {
- if(ObjectInfo[Closest[loop]][ObjectCreated][playerid] == false)
- {
- ObjectInfo[Closest[loop]][ObjectID][playerid] = CreatePlayerObject(playerid, ObjectInfo[Closest[loop]][ModelID], ObjectInfo[Closest[loop]][ox], ObjectInfo[Closest[loop]][oy], ObjectInfo[Closest[loop]][oz], ObjectInfo[Closest[loop]][orox], ObjectInfo[Closest[loop]][oroy], ObjectInfo[Closest[loop]][oroz], ObjectInfo[Closest[loop]][ovdist]);
- ObjectInfo[Closest[loop]][ObjectCreated][playerid] = true;
- }
- }
- }
- }
- #define SetPlayerPos F_SetPlayerPos
- stock F_SetPlayerPos(playerid, Float:x, Float:y, Float:z)
- {
- F_PlayerObjectUpdate(playerid, x, y, z);
- SetPlayerPos(playerid, x, y, z);
- }
- stock SetXmasTree(Float:x,Float:y,Float:z)
- {
- for(new i = 0; i < sizeof(Treepos); i++)
- {
- if(Treepos[i][XmasTreeX] == 0)
- {
- Treepos[i][XmasTreeX]=1;
- Treepos[i][XmasX]=x;
- Treepos[i][XmasY]=y;
- Treepos[i][XmasZ]=z;
- Treepos[i][XmasObject1] = F_CreateObject(19076, x, y, z-1.0,0,0,300);//xmas tree
- Treepos[i][XmasObject2] = F_CreateObject(19054, x, y+1.0, z-0.4,0,0,300);//XmasBox1
- Treepos[i][XmasObject3] = F_CreateObject(19058, x+1.0, y, z-0.4,0,0,300);//XmasBox5
- Treepos[i][XmasObject4] = F_CreateObject(19056, x, y-1.0, z-0.4,0,0,300);//XmasBox3
- Treepos[i][XmasObject5] = F_CreateObject(19057, x-1.0, y, z-0.4,0,0,300);//XmasBox4
- Treepos[i][XmasObject6] = F_CreateObject(19058, x-1.5, y+1.5, z-1.0,0,0,300);//XmasBox5
- Treepos[i][XmasObject7] = F_CreateObject(19055, x+1.5, y-1.5, z-1.0,0,0,300);//XmasBox2
- Treepos[i][XmasObject8] = F_CreateObject(19057, x+1.5, y+1.5, z-1.0,0,0,300);//XmasBox4
- Treepos[i][XmasObject9] = F_CreateObject(19054, x-1.5, y-1.5, z-1.0,0,0,300);//XmasBox1
- Treepos[i][XmasObject10] = F_CreateObject(3526, x, y, z-1.0,0,0,300);//Airportlight - for flashing affect
- return 1;
- }
- }
- return 0;
- }
- stock DeleteAllXmasTree()
- {
- for(new i = 0; i < sizeof(Treepos); i++)
- {
- if(Treepos[i][XmasTreeX] == 1)
- {
- Treepos[i][XmasTreeX]=0;
- Treepos[i][XmasX]=0.0;
- Treepos[i][XmasY]=0.0;
- Treepos[i][XmasZ]=0.0;
- F_DestroyObject(Treepos[i][XmasObject1]);
- F_DestroyObject(Treepos[i][XmasObject2]);
- F_DestroyObject(Treepos[i][XmasObject3]);
- F_DestroyObject(Treepos[i][XmasObject4]);
- F_DestroyObject(Treepos[i][XmasObject5]);
- F_DestroyObject(Treepos[i][XmasObject6]);
- F_DestroyObject(Treepos[i][XmasObject7]);
- F_DestroyObject(Treepos[i][XmasObject8]);
- F_DestroyObject(Treepos[i][XmasObject9]);
- F_DestroyObject(Treepos[i][XmasObject10]);
- }
- }
- return 0;
- }
- stock DeleteClosestXmasTree(playerid)
- {
- for(new i = 0; i < sizeof(Treepos); i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, Treepos[i][XmasX], Treepos[i][XmasY], Treepos[i][XmasZ]))
- {
- if(Treepos[i][XmasTreeX] == 1)
- {
- Treepos[i][XmasTreeX]=0;
- Treepos[i][XmasX]=0.0;
- Treepos[i][XmasY]=0.0;
- Treepos[i][XmasZ]=0.0;
- F_DestroyObject(Treepos[i][XmasObject1]);
- F_DestroyObject(Treepos[i][XmasObject2]);
- F_DestroyObject(Treepos[i][XmasObject3]);
- F_DestroyObject(Treepos[i][XmasObject4]);
- F_DestroyObject(Treepos[i][XmasObject5]);
- F_DestroyObject(Treepos[i][XmasObject6]);
- F_DestroyObject(Treepos[i][XmasObject7]);
- F_DestroyObject(Treepos[i][XmasObject8]);
- F_DestroyObject(Treepos[i][XmasObject9]);
- F_DestroyObject(Treepos[i][XmasObject10]);
- return 1;
- }
- }
- }
- return 0;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement