[FilterScript] Selfie Flirtscript
#1

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:





V0.2 ScreenShots





Download:

V0.1

V0.2
pawn Code:
#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[i] = 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[i] = 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;
}
Enjoy and please don`t remove credits
Reply


Messages In This Thread
Selfie Filterscript - by JFF - 20.05.2014, 15:58
Re: Selfie Flirtscript - by superrobot48 - 20.05.2014, 16:00
Re: Selfie Flirtscript - by Hwang - 20.05.2014, 16:04
Re: Selfie Flirtscript - by JFF - 20.05.2014, 16:05
Re: Selfie Flirtscript - by Devil123 - 20.05.2014, 16:11
Re: Selfie Flirtscript - by JFF - 20.05.2014, 16:13
Re: Selfie Flirtscript - by FahadKing07 - 20.05.2014, 17:31
Re: Selfie Flirtscript - by JFF - 20.05.2014, 17:36
Re: Selfie Flirtscript - by Matz - 20.05.2014, 17:42
Re: Selfie Flirtscript - by JFF - 20.05.2014, 17:46
Re: Selfie Flirtscript - by LazyB0y - 21.05.2014, 08:05
Re: Selfie Flirtscript - by JFF - 21.05.2014, 09:09
Re: Selfie Flirtscript - by iRaiDeN - 21.05.2014, 10:24
Re: Selfie Flirtscript - by JFF - 21.05.2014, 10:32
Re: Selfie Flirtscript - by Matz - 21.05.2014, 22:10
Re: Selfie Flirtscript - by SickAttack - 21.05.2014, 22:28
Re: Selfie Flirtscript - by TakeiT - 22.05.2014, 01:39
Re: Selfie Flirtscript - by JFF - 22.05.2014, 04:08
Re: Selfie Flirtscript - by superrobot48 - 22.05.2014, 05:31
Re: Selfie Flirtscript - by JFF - 22.05.2014, 06:37
Re: Selfie Flirtscript - by Team_PRO - 22.05.2014, 07:25
Re: Selfie Flirtscript - by JFF - 22.05.2014, 07:31
Re: Selfie Flirtscript - by Iillminetor1 - 22.05.2014, 07:35
Re: Selfie Flirtscript - by JFF - 22.05.2014, 07:41
Re: Selfie Flirtscript - by TheKalle011 - 10.08.2014, 22:26
Re: Selfie Flirtscript - by iNiko - 17.08.2014, 17:34
Re: Selfie Flirtscript - by SkillNasr - 17.08.2014, 21:53
Re: Selfie Flirtscript - by DovFlaminggo - 25.08.2014, 14:10
Re: Selfie Flirtscript - by ScripteRNaBEEL - 25.08.2014, 14:19
Re: Selfie Flirtscript - by HydraHumza - 01.03.2015, 07:03
Re: Selfie Flirtscript - by Battlezone - 01.03.2015, 07:22
Re: Selfie Flirtscript - by wahyumahadir - 01.03.2015, 15:13
Re: Selfie Flirtscript - by JFF - 18.03.2015, 17:19
Re: Selfie Flirtscript - by kristo - 19.03.2015, 12:54
Respuesta: Selfie Flirtscript - by JuanStone - 20.03.2015, 17:18
Re: Selfie Flirtscript - by EiresJason - 20.03.2015, 17:24
Re: Selfie Flirtscript - by Mokless - 20.03.2015, 18:20
Re: Selfie Flirtscript - by JFF - 21.03.2015, 18:42
Re : Selfie Flirtscript - by Wassimo - 21.03.2015, 18:49
Re: Selfie Flirtscript - by dionisak0s - 21.03.2015, 19:54
Re: Selfie Flirtscript - by KingServerIRAN - 21.03.2015, 20:07
Re: Selfie Flirtscript - by JFF - 22.03.2015, 18:38
Re: Selfie Flirtscript - by MerryDeer - 14.02.2017, 13:12

Forum Jump:


Users browsing this thread: 9 Guest(s)