Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-10-24 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog

War3:Source

Development => Development and Programming Help => Topic started by: Necavi on September 06, 2012, 06:05:54 PM



Title: Player property testing plugin.
Post by: Necavi on September 06, 2012, 06:05:54 PM
Recently a friend asked me if it was possible to add more teams to CS:S (Something which I had done in previous versions, but not the most recent one), so I whipped up a little plugin to set the player's m_iTeamNum. Once I did that I realized that it would be even easier to just make something that gets/sets almost all of a player's properties and that's all this is.

Using it is as simple as typing set_prop_int m_iTeamNum 4 (to set your team number to a previously unused fourth team).

Full list of commands:
   set_prop_int
   set_prop_string
   set_prop_vector
   set_prop_float
   set_prop_ent
   
   get_prop_int
   get_prop_string
   get_prop_vector
   get_prop_float
   get_prop_ent

   prop_set_target

It will work on any platform that sourcemod does. Use sm_dump_netprops_xml <file> to create a file that lists all properties.

version 1.1
    Added colour formatting
    Added prop_set_target to set a global target


Title: Re: Player property testing plugin.
Post by: Revan on September 09, 2012, 02:23:05 AM
Thats realy nice! will surely come in handy here or there


Title: Re: Player property testing plugin.
Post by: Necavi on September 09, 2012, 02:49:57 AM
It really is. Also, I ended up making a much better version and uploading it here: https://forums.alliedmods.net/showthread.php?t=195395

It does some nice things like actually handling it if the entity doesn't have the requested property and that kind of thing.


Title: Re: Player property testing plugin.
Post by: Ownz on September 09, 2012, 03:39:05 PM
you should provide a link to where we can find the property strings


Title: Re: Player property testing plugin.
Post by: Necavi on September 09, 2012, 03:41:27 PM
I did. "sm_dump_netprops_xml <file>" It differs depending on the game and patch, but I have considered doing my own couple of dumps at some point.


Title: Re: Player property testing plugin.
Post by: Gliderā  ā µ on September 12, 2012, 02:45:11 PM
Can you add commands to change the props of the entity you're looking at? That would be mighty helpful


Title: Re: Player property testing plugin.
Post by: Necavi on September 12, 2012, 02:47:49 PM
Yep, that's on the list


Title: Re: Player property testing plugin.
Post by: Ownz on September 12, 2012, 10:37:43 PM
lol use the war3 trace functions to get the ent


Title: Re: Player property testing plugin.
Post by: Necavi on September 12, 2012, 11:02:21 PM
I'll use a good function for it, don't worry. I'm not making this plugin war3 specific, however.