.: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)
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:
READ: The text in RED is the weapon the shot will turn into.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 BLUE is the weapon needed for the bullet to change
And you also need this:
How can I change the Weapon to any weapon: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);
}
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();
.: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)
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
Pretty Useful, thanks
Maybe you can explain this a little further? What does "getTagOrigin" etc means? Which one determinates the position?Code:MagicBullet( "ac130_25mm_mp", self getTagOrigin("tag_eye"), self GetCursorPosition(), self );
So getTagOrigin is the spawnpoint of the bullet and getCursorPos is the target?
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
how do you make no explosion damge so bullet doesnt kill you?
@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.
You better want to use "tag_weapon".