Quantcast

Jump to content

» «
Photo

[script] Camera Script in GTA IV

10 replies to this topic
Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013

#1

Posted 26 April 2014 - 02:58 PM Edited by Michael Wojtanis, 26 April 2014 - 02:59 PM.

Hi. JulioNIB said he gave me script and i used this to recond my video ... But i made my script and testing it. Here is code. There is all secret about camera and how this could work.

 

I dissapointed ... And Julio said to somebody i used his script... This is sad to hear ;/

 

PS. There is nothing with WatchDogs script. People just think it have, but no... this is JUST CAMERA.

using GTA;
using System;
namespace Technology_1
{
    public class Technology_1_Rinepim : Script
    {
        GTA.Timer check_visible,draw_light;
        GTA.Object kamerka;
        GTA.Ped camera_brain;
        Camera camera_player_cam;
        public Technology_1_Rinepim()
        {

            
            check_visible = new GTA.Timer(1, false);
            draw_light = new GTA.Timer(1, false);
            GTA.Native.Function.Call("REQUEST_MODEL", Model.FromString("e2_maison_camera"));
            kamerka = World.CreateObject(new Model("e2_maison_camera"), new Vector3(-412.1921F, 1391.7250F, 15.6087F));
            kamerka.Rotation = new Vector3(0,0F,30F);
            kamerka.Collision=false;
            kamerka.FreezePosition = true;


            this.BindConsoleCommand("camera1", new ConsoleCommandDelegate(Camera1), " - Change camera 1");
            this.BindConsoleCommand("clear", new ConsoleCommandDelegate(Clear_cam), " - Clear camera");
            string anim_play = "abdomen";
            AnimationSet anim_group = new AnimationSet("dam_rec_player");
            GTA.Native.Function.Call("REQUEST_MODEL", Model.FromString("ig_jason"));
            camera_brain = World.CreatePed(Model.FromString("ig_jason"), kamerka.Position-new Vector3(-0.03F,0.09F,1.7F));
            //camera_brain.FreezePosition = true;
            camera_brain.Invincible = true;
            GTA.Native.Function.Call("FREEZE_CHAR_POSITION_AND_DONT_LOAD_COLLISION",camera_brain,true);
            GTA.Native.Function.Call("SET_CHAR_COLLISION", camera_brain, false);
            GTA.Native.Function.Call("SET_CHAR_ROTATION", camera_brain, kamerka.Rotation.X, kamerka.Rotation.Y, kamerka.Rotation.Z);
            
            camera_brain.BlockGestures = true;
            camera_brain.BlockPermanentEvents = true;
            camera_brain.BlockWeaponSwitching = true;
            
            camera_brain.Voice = "test";
            //camera_brain.Visible = false;
            camera_brain.PriorityTargetForEnemies = false;
            camera_brain.Accuracy = 0;
            camera_brain.CancelAmbientSpeech();
            camera_brain.CowerInsteadOfFleeing = false;
            camera_brain.Task.TurnTo(kamerka.Position);
            camera_brain.SenseRange = 20.0F;
            camera_brain.Task.PlayAnimation(anim_group, anim_play, 1F, AnimationFlags.Unknown10 | AnimationFlags.Unknown06 | AnimationFlags.Unknown12 | AnimationFlags.Unknown11 | AnimationFlags.Unknown07 | AnimationFlags.Unknown08 | AnimationFlags.Unknown01);
            Game.Console.Print("X1");
            check_visible.Tick+= new EventHandler(check_visible_tick);
            draw_light.Tick += new EventHandler(draw_light_tick);
            draw_light.Start();
            check_visible.Start();
        }
        public void draw_light_tick(object sender, EventArgs e)
        {
            GTA.Game.Console.Print("time: " + draw_light.ElapsedTime);
            if (draw_light.ElapsedTime > 500)
            {
                GTA.Native.Function.Call("DRAW_CORONA", kamerka.Position.X + kamerka.Direction.X/5.5F, kamerka.Position.Y + kamerka.Direction.Y/10, kamerka.Position.Z - 0.135F, 10.0F, 255, 255, 55, 0, 0);
                if (draw_light.ElapsedTime > 1000)
                {
                    draw_light.Start();
                }
            }
        }
        public void check_visible_tick(object sender, EventArgs e)
        {
           
            if (GTA.Native.Function.Call<bool>("HAS_CHAR_SPOTTED_CHAR_IN_FRONT", camera_brain, Player.Character))
  
            {
//                Vector3 camera


                if (GTA.Native.Function.Call<bool>("IS_CHAR_FACING_CHAR", camera_brain, Player.Character, 20F) && GTA.Native.Function.Call<bool>("IS_CHAR_FACING_CHAR", Player.Character, camera_brain, 120F))
                {
                    float oblicz = kamerka.Position.Z - Player.Character.GetBonePosition(Bone.Head).Z;
                    float oblicz2 = kamerka.Position.Z - Player.Character.GetBonePosition(Bone.Head).Z;
                    float dystans = kamerka.Position.DistanceTo2D(Player.Character.Position);
                    if(oblicz>(0.40F+dystans/10) && (dystans>oblicz) )
                    Game.DisplayText("Detected");
                }
                else
                    Game.DisplayText("Out of range");


                
                
                //Game.DisplayText("Visible: "+result_angle+", - "+test1);
                //Game.DisplayText("Visible: "+result_angle+", - "+test1);
                
            }
            //else
              //  Game.DisplayText("Not Visible");
        }
        public void Camera1(ParameterCollection Parameter)
    {
        camera_player_cam = new Camera();
            camera_player_cam.Position = kamerka.Position;
            camera_player_cam.Rotation = new Vector3(kamerka.Rotation.X-20F,kamerka.Rotation.Y,kamerka.Rotation.Z-3F);
            camera_player_cam.FOV = 27F;
            camera_player_cam.Activate();
    }
        public void Clear_cam(ParameterCollection Parameter)
        {
            if(Game.Exists(camera_player_cam))
            camera_player_cam.Deactivate();
            draw_light.Stop();
            check_visible.Stop();
            kamerka.NoLongerNeeded();
            kamerka.Delete();
            camera_brain.NoLongerNeeded();
            camera_brain.Delete();
        }
    }
}

Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#2

Posted 26 April 2014 - 03:06 PM

I Think Gta Has a CAMERA IN MOBILE.. AND IS IT UPLOADED ON GTA 4 MODS  IF NOT I WILL UPLOAD IT AND OFCOURSE 
 

CREDITS : YOU!


Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013

#3

Posted 26 April 2014 - 03:09 PM Edited by Michael Wojtanis, 26 April 2014 - 03:11 PM.

Camera Script - check video:

 

The sense of this mod is to use this in mods - Watch Dogs example, sillient missions etc.

 

I just uploaded this because JulioNIB said he give me script but i do not have any message on YouTube... he reply 3 weeks ago "You want it" in basic words, but i not been here long time ago...


Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#4

Posted 26 April 2014 - 03:17 PM

Camera Script - check video:

 

The sense of this mod is to use this in mods - Watch Dogs example, sillient missions etc.

 

I just uploaded this because JulioNIB said he give me script but i do not have any message on YouTube... he reply 3 weeks ago "You want it" in basic words, but i not been here long time ago...

Man YOU ARE AWSOME I AM A FAN OF OURS ! 


julionib
  • julionib

    Coder

  • Members
  • Joined: 13 Sep 2012
  • Brazil

#5

Posted 27 April 2014 - 03:19 AM

so, only because one guy said something in a comment in your video you create a topic to say this about me? and if he was lying? and if he understood wrong what i said? did you think about that?

Untitled.jpg

i said that i sent to you, not said that you was using it, i sent to you a message weeks ago asking if you want my code case you didnt had anything like that, but you didnt answered, not even via personal message here in this forum...

Untitled.jpg

Untitled.jpg


Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#6

Posted 27 April 2014 - 03:22 AM

so, only because one guy said something in a comment in your video you create a topic to say this about me? and if he was lying? and if he understood wrong what i said? did you think about that?

Untitled.jpg

i said that i sent to you, not said that you was using it, i sent to you a message weeks ago asking if you want my code case you didnt had anything like that, but you didnt answered, not even via personal message here in this forum...

Untitled.jpg

Untitled.jpg

hey julio can you give me the code u make the menu of urself in which all ur mods are displayed?


ssalil
  • ssalil

    Shubhra Salil

  • Members
  • Joined: 20 Dec 2012
  • India

#7

Posted 27 April 2014 - 06:03 AM

Ummmm, What's happening between Julio & Wojtanis? Clear it out guys :) Don't quarrel or pinpoint for an user

line v
  • line v

    Player Hater

  • Members
  • Joined: 21 Nov 2013
  • India

#8

Posted 27 April 2014 - 01:39 PM

@Julio Please man don't place the blame on me.All this time I was explaining to Michael that it was definitely a misunderstanding please let us figure it out before making this public and yes i have shown our chat to Michael and I have been neutral and have told him that you are not a person to steal credit and have stood by you all this time so its not like i wanted you two to quarrel. Please note that i love both of your mods and support them all 100%  and hope we can move past this as this was just a HUGE misunderstanding.  :santa:  and yes i am videobuzz1000 and i am Adithya Dananjay and these are my only aliases. :cookie:  :cookie:  :cookie:  :cookie:  Please don't hate on anybody here as we just want those mods to develop and i hope that this stupid fight may rust in pieces and there will be happy ending.


julionib
  • julionib

    Coder

  • Members
  • Joined: 13 Sep 2012
  • Brazil

#9

Posted 27 April 2014 - 01:56 PM

its ok, i was just showing facts so people can conclude if what i said was misunderstood or what :)

  • line v likes this

Rugz007
  • Rugz007

    Scripters ... roll out !

  • Members
  • Joined: 19 Apr 2014
  • India

#10

Posted 28 April 2014 - 05:54 AM

man can u add that if camera see us ur wanted level increases?


Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013

#11

Posted 29 April 2014 - 04:54 PM

its ok, i was just showing facts so people can conclude if what i said was misunderstood or what :)

 

Yeah. I just wanted Your words to clear my name, because i do not like others polish people :p :)

Thanks for understanding that situation and sorry if You feel attacked by me. I do not wanted to looks like that. I just wanted call You to show people "no, he not stole my mod". :)

 

BTW. Make a Starwars sword... ;P





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users