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

[TF2] Casting Spells


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mitchell
~lick~
Join Date: Mar 2010
Old 10-30-2013 , 00:37   [TF2] Casting Spells
Reply With Quote #1

Okay so i have figured out how to make-shift cast spells:

Find the spell book and set the spell index and charges:
Code:
		while ((ent = FindEntityByClassname(ent, "tf_weapon_spellbook")) != -1)
		{
			if(ent)
			{
				if (GetEntPropEnt(ent, Prop_Send, "m_hOwnerEntity")==client)
				{
					SetEntProp(ent, Prop_Send, "m_iSelectedSpellIndex", spell);
					SetEntProp(ent, Prop_Send, "m_iSpellCharges", 10);
				}
			}
		}
Possible spells:
0 Fireball
1 Missile thingy (bats)
2 Ubercharge
3 Bomb
4 Super Jump
5 Invisible
6 Teleport
7 Electric Bolt
8 Small body, big head, speed
9 TEAM MONOCULUS
10 Meteor Shower
11 Skeleton Army (Spawns 3)
I used tf2 items to give my self a spell book, it is needed to cast spells.
Code:
SpawnWeapon(client, "tf_weapon_spellbook", 1069, 0, 0, "");
Spoiler


I will probably make a plugin to change/cast spells on players.
Still trying to figure out how to show the "current spell" on hud. lol.

Last edited by Mitchell; 10-30-2013 at 00:38.
Mitchell is offline
 



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 19:23.


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