AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   L4D2 Spawning Gnome[solved] (https://forums.alliedmods.net/showthread.php?t=136918)

Fleepster99 08-31-2010 12:52

L4D2 Spawning Gnome[solved]
 
Hey guys im trying to spawn a gnome and teleport it somewhere, now i know you can use "give gnome" to give one to a specific player but i want to spawn one and be able to account for it, so i can teleport him and do some good stuff to him:mrgreen:.

Thanks for your help.

FaTony 08-31-2010 13:23

Re: L4D2 Spawning Gnome
 
If "give gnome" works, then I presume that you should try to spawn weapon_gnome.

Fleepster99 08-31-2010 13:28

Re: L4D2 Spawning Gnome
 
Quote:

Originally Posted by FaTony (Post 1287205)
If "give gnome" works, then I presume that you should try to spawn weapon_gnome.

Im not sure how i would use that could you elaborate please.

FaTony 08-31-2010 13:36

Re: L4D2 Spawning Gnome
 
CreateEntityByName.

Fleepster99 08-31-2010 14:00

Re: L4D2 Spawning Gnome
 
Quote:

Originally Posted by FaTony (Post 1287227)
CreateEntityByName.

Thanks Fatony it worked great, heres the code if anyone likes to spawn gnomes(or other entities) for fun reasons.

PHP Code:

decl Float:GnomePosition[3]={1,1,1};//where u want the gnome to spawn
        //PrintToChatAll("gnome should have spawned");
        
new Ent CreateEntityByName("weapon_gnome");
        
DispatchSpawnEnt );
        
TeleportEntityEntGnomePositionNULL_VECTORNULL_VECTOR); 



All times are GMT -4. The time now is 08:19.

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