View Single Post
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