Jump to content

Selfie Flirtscript


TheBrainDit

Recommended Posts

Hello,

I was bored so i decided to create a selfie filterscript.

its a really simple filterscript that doesnt require any skills at all but its kinda fun.

Whats New:
~Now you can move in circle with the camera.
~Added /td to show/hide the textdraws.
~Fixed the clearanimations after you stop taking the selfie.

ScreenShots:

V0.1 ScreenShots:

b8G9wB0.jpg

24Uh2zX.jpg

V0.2 ScreenShots

8XM54VN.png

319nRK4.png

Download:

V0.2

#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>

#define PRESSED(%0) 
	(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
	
new takingselfie[MAX_PLAYERS];
new Float:Degree[MAX_PLAYERS];
const Float: Radius = 1.4; //do not edit this
const Float: Speed  = 1.25; //do not edit this
const Float: Height = 1.0; // do not edit this
new Text:Textdraw2;
new Float:lX[MAX_PLAYERS];
new Float:lY[MAX_PLAYERS];
new Float:lZ[MAX_PLAYERS];
new hiden[MAX_PLAYERS];

#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_RED 0xFF0000AA

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("n--------------------------------------");
	print(" Selfie FilterScript By: JFF");
	print("--------------------------------------n");
	for(new i =0; i<MAX_PLAYERS;i++)
	    takingselfie = 0;
	Textdraw2 = TextDrawCreate(227.000000, 10.000000, "~r~Press F8 to take a selfie.~n~~n~~y~Num 6/Num 4 to move the camera.~n~~n~~p~/td to hide/show the textdraws.~n~~n~~g~/selfie to stop taking selfies.~n~~n~~w~/headmove to disable the head movement.");
	TextDrawBackgroundColor(Textdraw2, 255);
	TextDrawFont(Textdraw2, 1);
	TextDrawLetterSize(Textdraw2, 0.500000, 1.300000);
	TextDrawColor(Textdraw2, -16776961);
	TextDrawSetOutline(Textdraw2, 0);
	TextDrawSetProportional(Textdraw2, 1);
	TextDrawSetShadow(Textdraw2, 1);
	TextDrawSetSelectable(Textdraw2, 0);
	return 1;
}

public OnFilterScriptExit()
{
    for(new i =0; i<MAX_PLAYERS;i++)
	    takingselfie = 0;
	return 1;
}

#else

main()
{
	print("n--------------------------------------");
	print(" Selfie FilterScript By: JFF");
	print("--------------------------------------n");
}

#endif

public OnPlayerConnect(playerid)
{
	takingselfie[playerid] = 0;
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	takingselfie[playerid] = 0;
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(takingselfie[playerid] == 1)
	{
		if(PRESSED(KEY_ANALOG_RIGHT))
		{
			GetPlayerPos(playerid,lX[playerid],lY[playerid],lZ[playerid]);
			static Float: n1X, Float: n1Y;
		    if(Degree[playerid] >= 360) Degree[playerid] = 0;
		    Degree[playerid] += Speed;
		    n1X = lX[playerid] + Radius * floatcos(Degree[playerid], degrees);
		    n1Y = lY[playerid] + Radius * floatsin(Degree[playerid], degrees);
		    SetPlayerCameraPos(playerid, n1X, n1Y, lZ[playerid] + Height);
		    SetPlayerCameraLookAt(playerid, lX[playerid], lY[playerid], lZ[playerid]+1);
		    SetPlayerFacingAngle(playerid, Degree[playerid] - 90.0);
		}
		if(PRESSED(KEY_ANALOG_LEFT))
		{
		    GetPlayerPos(playerid,lX[playerid],lY[playerid],lZ[playerid]);
			static Float: n1X, Float: n1Y;
		    if(Degree[playerid] >= 360) Degree[playerid] = 0;
		    Degree[playerid] -= Speed;
		    n1X = lX[playerid] + Radius * floatcos(Degree[playerid], degrees);
		    n1Y = lY[playerid] + Radius * floatsin(Degree[playerid], degrees);
		    SetPlayerCameraPos(playerid, n1X, n1Y, lZ[playerid] + Height);
		    SetPlayerCameraLookAt(playerid, lX[playerid], lY[playerid], lZ[playerid]+1);
		    SetPlayerFacingAngle(playerid, Degree[playerid] - 90.0);
		}
	}
	return 1;
}

CMD:selfie(playerid,params[])
{
	if(takingselfie[playerid] == 0)
	{
	    GetPlayerPos(playerid,lX[playerid],lY[playerid],lZ[playerid]);
		static Float: n1X, Float: n1Y;
		if(Degree[playerid] >= 360) Degree[playerid] = 0;
		Degree[playerid] += Speed;
		n1X = lX[playerid] + Radius * floatcos(Degree[playerid], degrees);
		n1Y = lY[playerid] + Radius * floatsin(Degree[playerid], degrees);
		SetPlayerCameraPos(playerid, n1X, n1Y, lZ[playerid] + Height);
		SetPlayerCameraLookAt(playerid, lX[playerid], lY[playerid], lZ[playerid]+1);
		SetPlayerFacingAngle(playerid, Degree[playerid] - 90.0);
		takingselfie[playerid] = 1;
		ApplyAnimation(playerid, "PED", "gang_gunstand", 4.1, 1, 1, 1, 1, 1, 1);
	    TextDrawShowForPlayer(playerid,Textdraw2);
		return 1;
	}
    if(takingselfie[playerid] == 1)
	{
	    TogglePlayerControllable(playerid,1);
		SetCameraBehindPlayer(playerid);
	    TextDrawHideForPlayer(playerid,Textdraw2);
	    takingselfie[playerid] = 0;
	    ApplyAnimation(playerid, "PED", "ATM", 4.1, 0, 1, 1, 0, 1, 1);
	    return 1;
	}
    return 1;
}

CMD:td(playerid,params[])
{
	if(takingselfie[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"ERROR: This command works only while taking a selfie");
	if(hiden[playerid] == 0)
	{
    	TextDrawHideForPlayer(playerid,Textdraw2);
    	hiden[playerid] = 1;
    	return 1;
    }
    if(hiden[playerid] == 1)
	{
    	TextDrawShowForPlayer(playerid,Textdraw2);
    	hiden[playerid] = 0;
    	return 1;
    }
    return 1;
}
  • Upvote 1

Romania Stunt Forever » Fun/Stunt/Drift/Minigames/Race/Derby/DM/CnR

IP : 188.212.106.49:7777

SA-MP Version : 0.3z-R4

Admin FREE! Join US !

Link to comment
Share on other sites

Ai face bine sa nu mai postezi scripturi facute de altii, nu devii mai interesant sa sti.

nu le postez sa fiu interesat ....... le postez sa le aibe si alti ... si nu se zice ca e facut de mine ;)

Romania Stunt Forever » Fun/Stunt/Drift/Minigames/Race/Derby/DM/CnR

IP : 188.212.106.49:7777

SA-MP Version : 0.3z-R4

Admin FREE! Join US !

Link to comment
Share on other sites

Ba copile tu cred ca suferi. Nu mai posta FS-uri pentru ca deja stim acele FS-uri. Ma gandesc ca, toti de aici au si cont pe sa-mp.com . Iar ce faci postand aceste FS-uri le iau ca si +1 adica sa iti faci si tu 'postări' pe forum. Si am aprecia daca ar fi facut de tine.

Edited by xStyle

 

logo.png

Link to comment
Share on other sites

nu le postez sa fiu interesat ....... le postez sa le aibe si alti ... si nu se zice ca e facut de mine ;)

Asa numitii "altii" pot lua acest FS de unde a fost el postat :). Nu e nevoie ca sa il imprastie tot copilu pe toate comunitatile.

242086.png

Link to comment
Share on other sites

Asa numitii "altii" pot lua acest FS de unde a fost el postat :). Nu e nevoie ca sa il imprastie tot copilu pe toate comunitatile.

ba taci te rog sa nu te mai aud .... ca ma enervezi , era postat doar pe .com , crezi ca toti stiu de site ala?

Taci odata te rog eu .

Te bagi la orice topic al meu ca musca la ****

Romania Stunt Forever » Fun/Stunt/Drift/Minigames/Race/Derby/DM/CnR

IP : 188.212.106.49:7777

SA-MP Version : 0.3z-R4

Admin FREE! Join US !

Link to comment
Share on other sites

ba taci te rog sa nu te mai aud .... ca ma enervezi , era postat doar pe .com , crezi ca toti stiu de site ala?

Taci odata te rog eu .

Te bagi la orice topic al meu ca musca la ****

Imi fac treaba, fata de plagiatori si nerecunoscatori ^^.

Stiu cate nume ai plagiat, cat de recunoscator ai fost, si asta dovedeste ca nu esti mai presus de cat un simplu jucator de sa-mp.

 

1. De script habar nu ai.

2. De mapping nici nu se pune problema.

3. Sti doar sa comentezi, sa enervezi lumea si sa te lauzi cu creeati ce vin din partea altor persoane.

 

 

ba taci te rog sa nu te mai aud .... ca ma enervezi , era postat doar pe .com , crezi ca toti stiu de site ala?

De ce as face-o de vreme ce orice membru are dreptul de a-si exprima parerea?

Asta dovedeste inca o data cat de incapabil si increzut esti.

Daca nu toti stiu de site-ul ala, aia nu se numesc scripteri, daca esti scripter, vrei sa iti faci server, trebuie sa ai habar de orice.

 

In general nu imi place cearta, dar vad ca unele persoane chiar cer asta, si nu le lua ca pe jigniri, ci ca pe viata ta reala.

Edited by KnowN
  • Upvote 2

242086.png

Link to comment
Share on other sites

Propun sa se inchida acest topic, vad ca unii nu respecta drepturile de autor, nici macar nu pun autorul original.

Pe langa acest fapt, ai un comportament nepotrivit fata de un membru din staff, ceea ce...cred eu ca nu este bine, cel putin in aceasta comunitate.

Ocupation: Youtube, Mined Bitcoin's, Scripting & Mapping SA:MP

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.