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

War3:Source
September 21, 2012, 09:40:14 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Player property testing plugin.  (Read 165 times)
Necavi
Full Member
***
Posts: 217


View Profile
« 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
« Last Edit: September 07, 2012, 01:28:49 AM by Necavi » Logged

Revan
Sr. Member
****
Posts: 263



View Profile
« Reply #1 on: September 09, 2012, 02:23:05 AM »

Thats realy nice! will surely come in handy here or there
Logged

Necavi
Full Member
***
Posts: 217


View Profile
« Reply #2 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.
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #3 on: September 09, 2012, 03:39:05 PM »

you should provide a link to where we can find the property strings
Logged

DarkEnergy
Necavi
Full Member
***
Posts: 217


View Profile
« Reply #4 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.
Logged

Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 402


⠠⠵


View Profile
« Reply #5 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
Logged

Necavi
Full Member
***
Posts: 217


View Profile
« Reply #6 on: September 12, 2012, 02:47:49 PM »

Yep, that's on the list
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2032



View Profile WWW Email
« Reply #7 on: September 12, 2012, 10:37:43 PM »

lol use the war3 trace functions to get the ent
Logged

DarkEnergy
Necavi
Full Member
***
Posts: 217


View Profile
« Reply #8 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.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!