Raised This Month: $ Target: $400
 0% 

DispatchKeyValue woes


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Bad HAL 9000
Senior Member
Join Date: Mar 2004
Location: Minnesota, USA
Old 06-25-2004 , 21:20   DispatchKeyValue woes
Reply With Quote #1

Im pretty new at this entity stuff, I have managed to get some stuff working, but am having trouble here

Code:
@PointClass base(Target) size(-16 -16 -36, 16 16 36) color(255 125 0) = ts_powerup : "TS powerup" 
[
	pwuptype(choices) : "Powerup Type" : 0 =
	[
		0: "Random"
		1: "Slow Motion"
		2: "Infinite Clip"
		4: "Kung Fu"
		8: "Slow Pause"
		16: "Double Firerate"
		32: "Grenade"
		64: "Health"
		128: "Armor"
		256: "Low Gravity"
	]

	pwupduration(integer) : "Respawn time" : 60

	message(string) : "Message when pick up"
]
From the FDG of the ent I want to make

Now, here is my code to spawn the ent I want, most of it was from AssKickR

Code:
public create_powerup(id) {  /*Made by AssKicR.. CopyLeft 2004->Eternity*/   client_print(id,print_chat,"You have tried to spawn a powerup") new ent = create_entity("ts_powerup")   DispatchKeyValue(ent, "pwuptype", "256") // DispatchKeyValue(ent, "pwuptype", 256)  // invalid argument type, cant use int... wtf DispatchSpawn(ent)   new Float:fNewOrigin[3]   entity_get_vector(id, EV_VEC_origin, fNewOrigin)   entity_set_origin(ent, fNewOrigin) fake_touch(id,ent) fake_touch(ent,id) remove_entity(ent)     return PLUGIN_HANDLED    }
__________________
Bad HAL 9000 is offline
Send a message via ICQ to Bad HAL 9000 Send a message via AIM to Bad HAL 9000 Send a message via MSN to Bad HAL 9000 Send a message via Yahoo to Bad HAL 9000
 


Thread Tools
Display Modes

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 14:40.


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