Raised This Month: $12 Target: $400
 3% 

Spawn person as infected


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Caps Lock Fuck Yeah
Member
Join Date: Oct 2010
Old 11-09-2010 , 19:54   Spawn person as infected
Reply With Quote #1

Hi, i was wondering if anyone knows how to make someone spawn as a specific special infected.
I have tried using FakeClientCommand(client, "z_spawn spitter") but that just spawns a random dead infected player as a spitter, not the person i executed the command on.
If anyone has any help on how to do this, i would be very grateful.
Caps Lock Fuck Yeah is offline
McFlurry
Veteran Member
Join Date: Mar 2010
Location: RemoveEdict(0);
Old 11-10-2010 , 00:59   Re: Spawn person as infected
Reply With Quote #2

A little tip Skyy of the forums told me is to set "m_lifeState" of the person you want to give the infected to true and everyone else to false then switch them to how they need to be after z_spawn command.
__________________
McFlurry is offline
Send a message via Skype™ to McFlurry
Caps Lock Fuck Yeah
Member
Join Date: Oct 2010
Old 11-10-2010 , 01:07   Re: Spawn person as infected
Reply With Quote #3

Thanks, ill try that.
Caps Lock Fuck Yeah is offline
Mr. Zero
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 11-10-2010 , 03:47   Re: Spawn person as infected
Reply With Quote #4

http://forums.alliedmods.net/showthread.php?t=114979

PHP Code:
/**
* Spawn the specified zombie boss
*
* @param client                Client index.
* @param Class                Class of boss (see constants ZC_ in top of this file)
* @param bGhost                True = spawned as ghost, False= spawned as alived..
* @param bGhostFinale        True = spawned as ghost in finale, False= spawned as alived.in finale
* @param bAuto                Use director auto position? True = use, False = spawn in eye direction (if param Origin not set)
* @param Origin             Set position new zombie
* @param Angles             Set angles new zombie
* @param Velocity            Set velocitys new zombie
* @return                    True if successfully spawn, false otherwise.
* @error            Invalid handle, or bounds error.
*                     Invalid infected class
*                     Client is alive
*                     Client is not in game
*                     Client is not infected team
*                     Can't get open config file (gamedata\InfectedAPI.txt) (FAILSTATE FOR PLUGIN)
*                     Can't get offsets (FAILSTATE FOR PLUGIN)
*/
stock SpawnInfectedBoss(any:clientany:Class, bool:bGhost=falsebool:bAuto=truebool:bGhostFinale=false ,const Float:Origin[3]={0.0,0.0,0.0},const Float:Angles[3]={0.0,0.0,0.0},const Float:Velocity[3]={0.0,0.0,0.0}) 
Mr. Zero is offline
Caps Lock Fuck Yeah
Member
Join Date: Oct 2010
Old 11-10-2010 , 20:30   Re: Spawn person as infected
Reply With Quote #5

Quote:
Originally Posted by Mr. Zero View Post
http://forums.alliedmods.net/showthread.php?t=114979

PHP Code:
/**
* Spawn the specified zombie boss
*
* @param client                Client index.
* @param Class                Class of boss (see constants ZC_ in top of this file)
* @param bGhost                True = spawned as ghost, False= spawned as alived..
* @param bGhostFinale        True = spawned as ghost in finale, False= spawned as alived.in finale
* @param bAuto                Use director auto position? True = use, False = spawn in eye direction (if param Origin not set)
* @param Origin             Set position new zombie
* @param Angles             Set angles new zombie
* @param Velocity            Set velocitys new zombie
* @return                    True if successfully spawn, false otherwise.
* @error            Invalid handle, or bounds error.
*                     Invalid infected class
*                     Client is alive
*                     Client is not in game
*                     Client is not infected team
*                     Can't get open config file (gamedata\InfectedAPI.txt) (FAILSTATE FOR PLUGIN)
*                     Can't get offsets (FAILSTATE FOR PLUGIN)
*/
stock SpawnInfectedBoss(any:clientany:Class, bool:bGhost=falsebool:bAuto=truebool:bGhostFinale=false ,const Float:Origin[3]={0.0,0.0,0.0},const Float:Angles[3]={0.0,0.0,0.0},const Float:Velocity[3]={0.0,0.0,0.0}) 
I don't know how i missed that...
Thank you very much, you just made my job easier.
Internet cookie for you
Caps Lock Fuck Yeah is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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