[FilterScript] System Cameras || [V1.0]
#1

♥Introduction
This script was done by the applications that created drakon la ne a topic and went and did it ne!
[COLOR="rgb(139, 0, 0)"]☻[/COLOR]He pretty simple and you add security cameras using AddCamera

♥Como Usar
AddCamera e usado da seguinte forma:

pawn Код:
//                 Name            X                  Y           Z        Angle
AddCamera("Los Santos", 1209.8090,-1751.8210,13.5937,2125.52);
And right after that and so simple to use / home cameras that will tar all cameras added

@ Credits: HigorOliver

Coder :
pawn Код:
//==============================================================================
#include <a_samp>
#define FILTERSCRIPT // Define FS
#define MAX_CAM     500  // Max de Cameras
//==============================================================================
new
    Total=-1;
enum
    Cams
{
    CameraN[100],
    Float:Cod1,
    Float:Cod2,
    Float:Cod3,
    Float:Angulo,
    ID
};
new
    Camera[MAX_CAM][Cams];
//==============================================================================
public
    OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("System de Camera By: Higor (:");
    print("--------------------------------------\n");

    AddCamera("Los Santos", 1209.8090,-1751.8210,13.5937,2125.52);

    return true;
}


//==============================================================================
stock
    AddCamera(nomete[], Float:codd1, Float:codd2, Float:codd3,Float:angle1)
{
    Total++;
    format(Camera[Total][CameraN],100,"%s",nomete);
    Camera[Total][Cod1] = codd1;
    Camera[Total][Cod2] = codd2;
    Camera[Total][Cod3] = codd3;
    Camera[Total][Angulo] = angle1;
    Camera[Total][ID] = Total;
    printf("ID: %d Camera: %s  ",Total,Camera[Total][CameraN]);
    return true;
}

//==============================================================================
public
    OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new string[128];
    if(listitem == Camera[listitem][ID])
    {
        if(!response) return false;
        format(string, sizeof(string), "Camera -> %s", Camera[listitem][CameraN]);
        SendClientMessage(playerid, 0xFFFFFFFF, string);
        SetPlayerCameraPos(playerid,Camera[listitem][Cod1],Camera[listitem][Cod2],Camera[listitem][Cod3]);
        SetPlayerFacingAngle(playerid,Camera[listitem][Angulo]);
        return true;
    }
    return false;
}


//==============================================================================
public
    OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/cameras", true)) {
        new dados[1050];
        format(dados, 1050, "");
        for(new i=0;i<=Total;i++) {
            format(dados,1050, "%s%s\n",dados,Camera[i][CameraN]);
        }
        ShowPlayerDialog(playerid,251,DIALOG_STYLE_LIST, "Cameras",dados,"Go", "Exit");
    }

    return false;
}
Reply
#2

Quote:
Originally Posted by [Banido]HigorOliver
Посмотреть сообщение
♥Introduction
This script was done by the applications that created drakon la ne a topic and went and did it ne!
[COLOR="rgb(139, 0, 0)"]☻[/COLOR]He pretty simple and you add security cameras using AddCamera

♥Como Usar
AddCamera e usado da seguinte forma:

pawn Код:
//                 Name            X                  Y           Z        Angle
AddCamera("Los Santos", 1209.8090,-1751.8210,13.5937,2125.52);
And right after that and so simple to use / home cameras that will tar all cameras added

@ Credits: HigorOliver

Coder :
pawn Код:
//==============================================================================
#include <a_samp>
#define FILTERSCRIPT // Define FS
#define MAX_CAM     500  // Max de Cameras
//==============================================================================
new
    Total=-1;
enum
    Cams
{
    CameraN[100],
    Float:Cod1,
    Float:Cod2,
    Float:Cod3,
    Float:Angulo,
    ID
};
new
    Camera[MAX_CAM][Cams];
//==============================================================================
public
    OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(System de Camera By: Higor (:");
    print("
--------------------------------------\n");

    AddCamera("
Los Santos", 1209.8090,-1751.8210,13.5937,2125.52);

    return true;
}


//==============================================================================
stock
    AddCamera(nomete[], Float:codd1, Float:codd2, Float:codd3,Float:angle1)
{
    Total++;
    format(Camera[Total][CameraN],100,"
%s",nomete);
    Camera[Total][Cod1] = codd1;
    Camera[Total][Cod2] = codd2;
    Camera[Total][Cod3] = codd3;
    Camera[Total][Angulo] = angle1;
    Camera[Total][ID] = Total;
    printf("
ID: %d Camera: %s  ",Total,Camera[Total][CameraN]);
    return true;
}

//==============================================================================
public
    OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new string[128];
    if(listitem == Camera[listitem][ID])
    {
        if(!response) return false;
        format(string, sizeof(string), "
Camera -> %s", Camera[listitem][CameraN]);
        SendClientMessage(playerid, 0xFFFFFFFF, string);
        SetPlayerCameraPos(playerid,Camera[listitem][Cod1],Camera[listitem][Cod2],Camera[listitem][Cod3]);
        SetPlayerFacingAngle(playerid,Camera[listitem][Angulo]);
        return true;
    }
    return false;
}


//==============================================================================
public
    OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "
/cameras", true)) {
        new dados[1050];
        format(dados, 1050, "
");
        for(new i=0;i<=Total;i++) {
            format(dados,1050, "
%s%s\n",dados,Camera[i][CameraN]);
        }
        ShowPlayerDialog(playerid,251,DIALOG_STYLE_LIST, "
Cameras",dados,"Go", "Exit");
    }

    return false;
}
pawn Код:
print(System de Camera By: Higor (:");
You forgot the the first quotationmark.

pawn Код:
print("System de Camera By: Higor (:");
Reply
#3

Thank.
(:
Reply
#4

Looks tasty Nice job their, btw maybe some screenies ?
Reply
#5

some pics please
Reply
#6

add some picks
Reply
#7

Quote:
Originally Posted by vyper
Посмотреть сообщение
some pics please
I'm out of GTA not to take pictures
Reply
#8

sow basicly its an copy of sandra's camera system: https://sampforum.blast.hk/showthread.php?tid=68492&page=13
Reply
#9

had never seen the Sandra and I did not copy
Reply
#10

nice job!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)