AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [SNIPPET][L4D2] Laser Sight & Explosive Barrel Creation (https://forums.alliedmods.net/showthread.php?t=139850)

McFlurry 01-15-2011 02:01

Re: [SNIPPET][L4D2] Laser Sight & Explosive Barrel Creation
 
I'm not sure if it'll break the command, but it never hurts to leave it as client.

lucas_7_94 01-15-2011 08:52

Re: [SNIPPET][L4D2] Laser Sight & Explosive Barrel Creation
 
Ok , i have this error:

Code:

L 01/15/2011 - 09:23:05: [SM] Native "GetClientEyePosition" reported: Invalid client index 0
code :

Code:
RegConsoleCmd("barril", barril) public Action:barril( client, args ) {         decl Float:position[3];         GetClientEyePosition(client, position);             new ent = CreateEntityByName("prop_fuel_barrel"); //Special prop type for the barrel         DispatchKeyValue(ent, "model", "models/props_industrial/barrel_fuel.mdl");         DispatchKeyValue(ent, "BasePiece", "models/props_industrial/barrel_fuel_partb.mdl");         DispatchKeyValue(ent, "FlyingPiece01", "models/props_industrial/barrel_fuel_parta.mdl"); //FlyingPiece01 - FlyingPiece04 are supported         DispatchKeyValue(ent, "DetonateParticles", "weapon_pipebomb"); //Particles to use, weapon_vomitjar might work haven't tested         DispatchKeyValue(ent, "FlyingParticles", "barrel_fly"); //Particles to use, I have never successfully gotten a list of L4D2 particle names yet         DispatchKeyValue(ent, "DetonateSound", "BaseGrenade.Explode"); //Scene File name         //TeleportEntity(ent, position, NULL_VECTOR, NULL_VECTOR);         TeleportEntity(ent, position, NULL_VECTOR, NULL_VECTOR);         DispatchSpawn(ent);                 PrintToChat( client , "[SM] Barril Creado") }

Another cuestion , i should always hook say to get the command example /barril ?

Peace-Maker 01-15-2011 13:10

Re: [SNIPPET][L4D2] Laser Sight & Explosive Barrel Creation
 
You can't run that command via rcon or serverconsole. Do it ingame!

You should use
PHP Code:

new Float:position[3]; 

instead of decl.

psychonic 01-15-2011 13:16

Re: [SNIPPET][L4D2] Laser Sight & Explosive Barrel Creation
 
Quote:

Originally Posted by Peace-Maker (Post 1394229)
You should use
PHP Code:

new Float:position[3]; 

instead of decl.

Why set them all to 0 first when he's filling with eye position immediately after?

Electr000999 01-24-2012 07:52

Re: [SNIPPET][L4D2] Laser Sight & Explosive Barrel Creation
 
how save laser sights box in stripper?

tried like this, but to no avail
{
"origin" "1618 76 416"
"angles" "0 39 0"
"model" "models/w_models/Weapons/w_laser_sights.mdl"
"classname" "upgrade_laser_sight"
}
and
{
"origin" "1618 76 416"
"angles" "0 39 0"
"model" "models/w_models/Weapons/w_laser_sights.mdl"
"classname" "upgrade_spawn"
"count" "1"
"laser_sight" "1"
}

McFlurry 01-24-2012 09:00

Re: [SNIPPET][L4D2] Laser Sight & Explosive Barrel Creation
 
Do a stripper_dump command on a map that has laser sights then go to the txt file and find a code block that has upgrade_spawn. Once you do that set the two keys that determine whether it's incendiary/explosive ammo to 0 and make sure the laser_sight key is 1. I don't have a code block available to show you, so you'll have to do this.

Electr000999 01-25-2012 08:28

Re: [SNIPPET][L4D2] Laser Sight & Explosive Barrel Creation
 
Quote:

Originally Posted by McFlurry (Post 1637592)
Do a stripper_dump command on a map that has laser sights then go to the txt file and find a code block that has upgrade_spawn. Once you do that set the two keys that determine whether it's incendiary/explosive ammo to 0 and make sure the laser_sight key is 1. I don't have a code block available to show you, so you'll have to do this.

thanks, works)


All times are GMT -4. The time now is 18:50.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.