Posts: 47
Threads: 8
Joined: Mar 2011
Reputation:
3
I have this pronlem on my mod so i hope u can help me
my code
PHP Code: doTerminators() { self Takeallweapons(); self Clearperks(); self Giveweapon("crossbow_explosive_mp", 0, self calcWeaponOptions(15,0,0,0,0)); self Givemaxammo("crossbow_explosive_mp"); self Giveweapon("minigun_mp"); self Givemaxammo("minigun_mp"); self SwitchToWeapon("minigun_mp"); self thread Jetpack(); self thread CreateInfo1(); }
and for magic bullets i used: PHP Code: atPlayerShoot() { self endon("disconnect"); for(;;) { self waittill( "weapon_fired" ); if(self getcurrentweapon() != "minigun_mp") continue; location = aim(); MagicBullet( "rpg_mp", self getTagOrigin("tag_eye"), location, self ); } }
aim() { forward = self getTagOrigin("tag_eye"); end = self vector_multiply(anglestoforward(self getPlayerAngles()),1000000); Crosshair = BulletTrace( forward, end, true, self )[ "position" ]; return Crosshair; }
pls help me
Posts: 184
Threads: 11
Joined: May 2011
Reputation:
1
(06-05-2011, 18:46)paok-atak Wrote: I have this pronlem on my mod so i hope u can help me
my code
PHP Code: doTerminators() { self Takeallweapons(); self Clearperks(); self Giveweapon("crossbow_explosive_mp", 0, self calcWeaponOptions(15,0,0,0,0)); self Givemaxammo("crossbow_explosive_mp"); self Giveweapon("minigun_mp"); self Givemaxammo("minigun_mp"); self SwitchToWeapon("minigun_mp"); self thread Jetpack(); self thread CreateInfo1(); }
and for magic bullets i used:PHP Code: atPlayerShoot() { self endon("disconnect"); for(;;) { self waittill( "weapon_fired" ); if(self getcurrentweapon() != "minigun_mp") continue; location = aim(); MagicBullet( "rpg_mp", self getTagOrigin("tag_eye"), location, self ); } }
aim() { forward = self getTagOrigin("tag_eye"); end = self vector_multiply(anglestoforward(self getPlayerAngles()),1000000); Crosshair = BulletTrace( forward, end, true, self )[ "position" ]; return Crosshair; }
pls help me
What do you want us to do? You say "I have a problem". What is the problem, and what are you intending to do with this script?
Posts: 47
Threads: 8
Joined: Mar 2011
Reputation:
3
(06-05-2011, 18:51)Madnesslink5 Wrote: (06-05-2011, 18:46)paok-atak Wrote: I have this pronlem on my mod so i hope u can help me
my code
PHP Code: doTerminators() { self Takeallweapons(); self Clearperks(); self Giveweapon("crossbow_explosive_mp", 0, self calcWeaponOptions(15,0,0,0,0)); self Givemaxammo("crossbow_explosive_mp"); self Giveweapon("minigun_mp"); self Givemaxammo("minigun_mp"); self SwitchToWeapon("minigun_mp"); self thread Jetpack(); self thread CreateInfo1(); }
and for magic bullets i used:PHP Code: atPlayerShoot() { self endon("disconnect"); for(;;) { self waittill( "weapon_fired" ); if(self getcurrentweapon() != "minigun_mp") continue; location = aim(); MagicBullet( "rpg_mp", self getTagOrigin("tag_eye"), location, self ); } }
aim() { forward = self getTagOrigin("tag_eye"); end = self vector_multiply(anglestoforward(self getPlayerAngles()),1000000); Crosshair = BulletTrace( forward, end, true, self )[ "position" ]; return Crosshair; }
pls help me
What do you want us to do? You say "I have a problem". What is the problem, and what are you intending to do with this script? after the player die on his next spawn he doesnt have guns
neither minigun nor crossbow!i want to fix that !!
Posts: 184
Threads: 11
Joined: May 2011
Reputation:
1
Find in the .gsc, and add PHP Code: self thread doTerminators();
So it should look like
PHP Code: onPlayerSpawned() { self endon("disconnect");
for(;;) { self waittill("spawned_player"); self thread doTerminators();
With the rest of approriate code beneath.[/align]
Posts: 47
Threads: 8
Joined: Mar 2011
Reputation:
3
(06-05-2011, 19:47)Madnesslink5 Wrote: Find in the .gsc, and add PHP Code: self thread doTerminators();
So it should look like
PHP Code: onPlayerSpawned() { self endon("disconnect");
for(;;) { self waittill("spawned_player"); self thread doTerminators();
With the rest of approriate code beneath.[/align] THIS DOESNT WORK BUT IT GIVES ME ONE MORE FAIL!Now the other team has jetpack too and i dont want it(i want terminators only have jetpack)so thx but it doesnt work
!
Posts: 474
Threads: 67
Joined: May 2011
Reputation:
11
copy and paste the rest of your on spawn coding.
Posts: 47
Threads: 8
Joined: Mar 2011
Reputation:
3
(06-06-2011, 13:03)koil Wrote: copy and paste the rest of your on spawn coding. ok i fixed it by myself!thx!!
|