Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,112
    My Mood
    Angelic

    Magic Bullet : How to make

    I guess this have been made befor, but When I searched for it.
    I didn't find the code and how to change/make it the way I wanted to.
    So now I will show/share with you guys.


    (Remember, I didn't make the code. But I made the "TuTorial" )


    First, you need the code:

    Bullet()
    {

    self endon("death");

    while (1){

    self waittill( "weapon_fired" );
    if ( self getCurrentWeapon() == "m21_mp" )
    {
    MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
    }
    }
    }
    READ: The text in RED is the weapon the shot will turn into.

    READ: The text in BLUE is the weapon needed for the bullet to change


    And you also need this:
    GetCursorPosition()
    {
    return BulletTrace( self getTagOrigin("tag_eye"), vector_Scale(anglestoforward(self getPlayerAngles()),1000000), 0, self )[ "position" ];
    }
    vector_scale(vec, scale)
    {
    return (vec[0] * scale, vec[1] * scale, vec[2] * scale);
    }
    How can I change the Weapon to any weapon:

    By doing this:
    Bullet()
    {

    self endon("death");
    wep = self getCurrentWeapon();

    while (1){

    self waittill( "weapon_fired" );
    if ( wep == wep )
    {
    MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
    }
    }
    }

    For New GSC Coders,

    How to add:
    Copy the 2 Box codes.
    Past them into your _rank.gsc file.
    Add this to the doDvars().
    self thread Bullet();

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  2. The Following 9 Users Say Thank You to Jorndel For This Useful Post:

    .:MUS1CFR34K:. (04-30-2011),Blackaiser (04-30-2011),Enibald (01-31-2013),KiNg5MuRaD (04-02-2012),liwei8257 (06-23-2011),Nachos (04-30-2011),NightmareDeV1 (05-01-2011),nismax (05-14-2011),StewieGriffin (05-05-2011)

  3. #2
    .:MUS1CFR34K:.'s Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    room 666
    Posts
    215
    Reputation
    12
    Thanks
    35
    My Mood
    Sneaky
    thanks i guess the code i had was broken XD
    () = not yet
    () = impossible
    () almost done
    () done and done

    100 posts ()
    200 posts ()
    99999999999 posts ()
    make a mod ()
    make a hack ()
    make a program ()
    get a life ()
    get 127 kills 17 deaths on rust ()
    get 240 kills 13 deaths on rust ()
    make a skin ()

    waiting for someone to help me fix my shit https://www.mpgh.net/forum/323-call-d...ax-errors.html

    enjoy the nightmare bitch

  4. #3
    NzVii's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    59
    Reputation
    10
    Thanks
    6
    My Mood
    Relaxed
    Pretty Useful, thanks

  5. #4
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,112
    My Mood
    Angelic
    Quote Originally Posted by NzVii View Post
    Pretty Useful, thanks
    No Problem

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  6. #5
    edub18's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Germany
    Posts
    146
    Reputation
    10
    Thanks
    12
    My Mood
    Bored
    Code:
    MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
    Maybe you can explain this a little further? What does "getTagOrigin" etc means? Which one determinates the position?

  7. #6
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    154
    My Mood
    Amazed
    Quote Originally Posted by Vanoq View Post
    Code:
    MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
    Maybe you can explain this a little further? What does "getTagOrigin" etc means? Which one determinates the position?
    getTagOrigin("tag_eye") is from where you shot it, in this case players eye and self getCursorPos() is the crosshair position.

  8. #7
    edub18's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Germany
    Posts
    146
    Reputation
    10
    Thanks
    12
    My Mood
    Bored
    So getTagOrigin is the spawnpoint of the bullet and getCursorPos is the target?

  9. #8
    csimami's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    21
    Reputation
    10
    Thanks
    1
    My Mood
    Angelic
    Bullet()
    {

    self endon("death");

    while (1){

    self waittill( "weapon_fired" );
    if ( self getCurrentWeapon() == "m21_mp" )
    {
    MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
    }
    }
    }

    I´ve add this to my rank_.gsc but it doesnt work i dont really get it and yeah im really new at coding or using source codes

  10. #9
    Nielson660's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    1
    My Mood
    Amused
    Quote Originally Posted by csimami View Post
    Bullet()
    {

    self endon("death");

    while (1){

    self waittill( "weapon_fired" );
    if ( self getCurrentWeapon() == "m21_mp" )
    {
    MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
    }
    }
    }

    I´ve add this to my rank_.gsc but it doesnt work i dont really get it and yeah im really new at coding or using source codes
    and again you bumped an old thread............
    it's forbidden.....

  11. #10
    moja.jst's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    436
    Reputation
    10
    Thanks
    27
    My Mood
    Sneaky
    how do you make no explosion damge so bullet doesnt kill you?

  12. #11
    writeoffz's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Location
    Antwerp
    Posts
    16
    Reputation
    10
    Thanks
    1
    @csimami Isn't that because you didn't have the GetCursorPosition() thread in your _rank.gsc?
    I'm not sure, because I normally script in _missions.gsc, but take a look
    Last edited by writeoffz; 12-31-2011 at 06:20 AM.

  13. #12
    Larity2056's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Location
    UDF 2457
    Posts
    2,497
    Reputation
    188
    Thanks
    700
    My Mood
    Dead
    You better want to use "tag_weapon".

  14. #13
    Swiftiiq's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    Work on steam?

  15. #14
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,112
    My Mood
    Angelic
    Quote Originally Posted by Swiftiiq View Post
    Work on steam?
    This is an source for GSC coding.
    Yes, it will work on steam if you know how to use it.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  16. #15
    Swiftiiq's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    So how to use it ?

Page 1 of 2 12 LastLast