#include < a_samp >
#include < streamer >
#include < zcmd>
#pragma tabsize 0
//----------------------NEW YEAR COUNTDOWN by Meta------------------------------
//#define German // Display the counter with german settings?
new cTime;
new Text:NYCounter;
new Text:HappyNewYearText;
//----------------------------GORRO----------------------//
new bool:UsandoGorro[MAX_PLAYERS];
//--------------------SNOWMAN TEXTDRAW by Zh3r0---------------------------------
#define V03c
#define COL_ORANGE "{FFAF00}"
#define COL_GREEN "{6EF83C}"
#define COL_RED "{FF4040}"
#define COL_BLUE "{0285FF}"
#define COL_YELLOW "{FFEA02}"
#define COL_EASY "{FFF1AF}"
//------------------SNOW by Michael@Belgium (edited & released by kwarde)-------
#define MAX_SLOTS 30
#define MAX_SNOW_OBJECTS 15
#define UPDATE_INTERVAL 750
#if MAX_SLOTS == -1
#error Change MAX_SLOTS to the max players of your server! (At line 6)
#endif
#define ploop(%0) for(new %0 = 0; %0 < MAX_SLOTS; %0++) if(IsPlayerConnected(%0))
#define CB:%0(%1) forward %0(%1); public %0(%1)
new boolnowOn[MAX_SLOTS char],
snowObject[MAX_SLOTS][MAX_SNOW_OBJECTS],
updateTimer[MAX_SLOTS char]
;
//------------------------------------------------------------------------------
#define MAX_XMASTREES 100
enum XmasTrees
{
XmasTreeX,
Float:XmasX,
Float:XmasY,
Float:XmasZ,
XmasObject1,
XmasObject2,
XmasObject3,
XmasObject4,
XmasObject5,
XmasObject6,
XmasObject7,
XmasObject8,
XmasObject9,
XmasObject10,
};
new Treepos[MAX_XMASTREES][XmasTrees];
//------------------------------------------------------------------------------
public OnFilterScriptInit( )
{
//-----------------------------------------
SetTimer( "Animate" , 300, true );
//------------SF christmas trees---------
CreateChristmasTree2(-1549.0511,585.0486,7.1797);
CreateChristmasTree1(-1548.4778,646.2723,7.1875);
CreateChristmasTree2(-1568.5579,828.9424,7.1875);
CreateChristmasTree1(-1991.4308,89.8115,27.6799);
CreateChristmasTree2(-1992.0767,205.6595,27.6875);
CreateChristmasTree1(-2633.8052,607.2700,14.4531);
CreateChristmasTree2(-2675.2756,607.2688,14.4545);
CreateChristmasTree1(-2600.0955,1384.2037,7.1607);
CreateChristmasTree2(-2608.5371,1348.2877,7.1953);
//-----------------------------------------
return true;
}
public OnFilterScriptExit( )
{
TextDrawDestroy(NYCounter);
TextDrawDestroy(HappyNewYearText);
KillTimer(cTime);
//---------------
ploop(i)
{
if(snowOn{i})
{
for(new j = 0; j < MAX_SNOW_OBJECTS; j++) DestroyDynamicObject(snowObject[i][j]);
KillTimer(updateTimer{i});
}
}
return true;
}
public OnPlayerDisconnect(playerid,reason)
{
if(snowOn{playerid})
{
for(new i = 0; i < MAX_SNOW_OBJECTS; i++) DestroyDynamicObject(snowObject[playerid][i]);
snowOn{playerid} = false;
KillTimer(updateTimer{playerid});
}
return 1;
}
public OnPlayerConnect( playerid )
{
new year, month, day, hour, minute, second;
getdate(year, month, day);
gettime(hour, minute, second);
if(day == 1 && month == 1 && (second > 0 || hour > 0)) TextDrawShowForPlayer(playerid, HappyNewYearText);
return true;
}
public OnPlayerSpawn(playerid)
{
CreateSnow(playerid);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
stock CreateChristmasTree1(Float:X, Float:Y, Float:Z)
{
CreateDynamicObject(3472,X+0.28564453,Y+0.23718262 ,Z+27.00000000,0.00000000,0.00000000,230.48021);
CreateDynamicObject(664,X+0.20312500,Y+0.01171875, Z+-3.00000000,0.00000000,0.00000000,0.00000000);
CreateDynamicObject(3472,X+0.45312500,Y+0.51562500 ,Z+4.00000000,0.00000000,0.00000000,69.7851562);
CreateDynamicObject(3472,X+0.65136719,Y+1.84570312 ,Z+17.00000000,0.00000000,0.00000000,41.863403);
CreateDynamicObject(7666,X+0.34130859,Y+0.16845703 ,Z+45.00000000,0.00000000,0.00000000,298.12524);
CreateDynamicObject(7666,X+0.34082031,Y+0.16796875 ,Z+45.00000000,0.00000000,0.00000000,27.850342);
CreateDynamicObject(3472,X+0.45312500,Y+0.51562500 ,Z+12.00000000,0.00000000,0.00000000,350.02441);
CreateDynamicObject(3472,X+0.45312500,Y+0.51562500 ,Z+7.00000000,0.00000000,0.00000000,30.0805664);
CreateDynamicObject(3472,X+0.45312500,Y+0.51562500 ,Z+22.00000000,0.00000000,0.00000000,230.47119);
CreateDynamicObject(1262,X+0.15039062,Y+0.57128906 ,Z+29.45285416,0.00000000,0.00000000,162.90527);
}
CB:UpdateSnow(playerid)
{
if(!snowOn{playerid}) return 0;
new FloatPos[3];
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
for(new i = 0; i < MAX_SNOW_OBJECTS; i++) SetDynamicObjectPos(snowObject[playerid][i], pPos[0] + random(25), pPos[1] + random(25), pPos[2] - 5);
return 1;
}
stock CreateSnow(playerid)
{
if(snowOn{playerid}) return 0;
new FloatPos[3];
GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
for(new i = 0; i < MAX_SNOW_OBJECTS; i++) snowObject[playerid][i] = CreateDynamicObject(18864, pPos[0] + random(25), pPos[1] + random (25), pPos[2] - 5, random(100), random(100), random(100), -1, -1, playerid);
snowOn{playerid} = true;
updateTimer{playerid} = SetTimerEx("UpdateSnow", UPDATE_INTERVAL, true, "i", playerid);
return 1;
}
stock DeleteSnow(playerid)
{
if(!snowOn{playerid}) return 0;
for(new i = 0; i < MAX_SNOW_OBJECTS; i++) DestroyDynamicObject(snowObject[playerid][i]);
KillTimer(updateTimer{playerid});
snowOn{playerid} = false;
return 1;
}
CMDnow(playerid, params[])
{
if(snowOn{playerid})
{
DeleteSnow(playerid);
SendClientMessage(playerid, 0x00FF00AA, "* Neve parou.");
}
else
{
CreateSnow(playerid);
SendClientMessage(playerid, 0x00FF00AA, "* Neve aparecendo!");
}
return 1;
}
stock CreateChristmasTree2(Float,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] = CreateDynamicObject(19076, x, y, z-1.0,0,0,300);//xmas tree
Treepos[i][XmasObject2] = CreateDynamicObject(19054, x, y+1.0, z-0.4,0,0,300);//XmasBox1
Treepos[i][XmasObject3] = CreateDynamicObject(19058, x+1.0, y, z-0.4,0,0,300);//XmasBox5
Treepos[i][XmasObject4] = CreateDynamicObject(19056, x, y-1.0, z-0.4,0,0,300);//XmasBox3
Treepos[i][XmasObject5] = CreateDynamicObject(19057, x-1.0, y, z-0.4,0,0,300);//XmasBox4
Treepos[i][XmasObject6] = CreateDynamicObject(19058, x-1.5, y+1.5, z-1.0,0,0,300);//XmasBox5
Treepos[i][XmasObject7] = CreateDynamicObject(19055, x+1.5, y-1.5, z-1.0,0,0,300);//XmasBox2
Treepos[i][XmasObject8] = CreateDynamicObject(19057, x+1.5, y+1.5, z-1.0,0,0,300);//XmasBox4
Treepos[i][XmasObject9] = CreateDynamicObject(19054, x-1.5, y-1.5, z-1.0,0,0,300);//XmasBox1
Treepos[i][XmasObject10] = CreateDynamicObject(3526, x, y, z-1.0,0,0,300);//Airportlight - for flashing affect
return 1;
}
}
return 0;
}
stock CreateChristmasLights(Float, Float:y, Float:z)
{
CreateDynamicObject(3472, x,y,z,0,0,300);
return 1;
}
|