Raised This Month: $66 Target: $400
 16% 

Plugin Editor - Push functions and edit variables, in game!


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:          Approver:   EKS (167)
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 01-03-2005 , 16:33   Plugin Editor - Push functions and edit variables, in game!
Reply With Quote #1

This plugin lets you edit variables, and run functions, from the console, in a fashion similar to vault, but...without actually making a plugin.
Confused?

This should help:
amx_func_exists <function name> <plugin>

Looks to see if the function <function exists in plugin <plugin>

Specify no plugin, and it will look in...well, this plugin. Which probably isnt what you want to do.

amx_func_begin < func name> <plugin name>

amx_push_value <value> <mode>

amx_func_end

amx_check_var <name of variable>
Tells you if the variable works.

amx_get_var <name of var> <mode>
mode 0 returns the number representation of the variable, while other modes return the float of it.

amx_set_var <name of var> <mode> <unit you want it to be>
Sets the variable specified to the unit you want it to be.
Mode is same as above.

Experimental. Test it out for me.
I'm baaack....


register_concmd("amx_check_var","check_var")
register_concmd("amx_get_var","get_var")
register_concmd("amx_edit_var","edit_var")
Attached Files
File Type: sma Get Plugin or Get Source (plugin_edit2.0.sma - 1501 views - 4.3 KB)
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
kingpin
Veteran Member
Join Date: Apr 2004
Location: kpsforum.com
Old 01-03-2005 , 17:28  
Reply With Quote #2

welcome back and from the look of it you have been busy.
__________________
kingpin is offline
Send a message via ICQ to kingpin Send a message via AIM to kingpin Send a message via MSN to kingpin Send a message via Yahoo to kingpin Send a message via Skype™ to kingpin
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 01-03-2005 , 17:44  
Reply With Quote #3

Hehe. yeah. Now I gotta go re-write jedi mind control.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-04-2005 , 21:25  
Reply With Quote #4

Wouldn't it be easier to recreate the AMXx callfunc commands? IE:

amx_cf_begin functionname pluginname.amxx
amx_cf_push_int 5
amx_cf_end
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 01-04-2005 , 21:43  
Reply With Quote #5

Quote:
Originally Posted by XxAvalanchexX
Wouldn't it be easier to recreate the AMXx callfunc commands? IE:

amx_cf_begin functionname pluginname.amxx
amx_cf_push_int 5
amx_cf_end
Tried it. If someone else tries to push the same function, or even the same plugin, it can cause lots of bad things.

Its much simpler to simply do it all at once.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 01-05-2005 , 05:23  
Reply With Quote #6

Sounds very interesting.

Might be a very useful tool for developers
__________________

BigBaller is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 01-05-2005 , 15:55  
Reply With Quote #7

"General purpose"?

I wonder what purpose at all you must have to have a use for this. Development, maybe... :-)
Johnny got his gun is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 01-05-2005 , 19:46  
Reply With Quote #8

I use it to mess with plugins. I need to fix it though, turns out ava was right.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-05-2005 , 23:05  
Reply With Quote #9

Quote:
Originally Posted by Twilight Suzuka
turns out ava was right.
I'm framing that.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 01-06-2005 , 00:33  
Reply With Quote #10

Its not as easy as you said however.
In order to push things in order, I have to do it like this:
new g_storedinputs[33][50][256]
new g_storedtypes[33][50]

See, in order to get them into the proper order, you have to also store their types. I've decided anyone with over 50 inputs to their function should be shot.

Updated:
Added:
amx_func_begin <function> <plugin>
amx_push_value <value> <mode>
mode 1: = int
mode 2: = float
mode 3: = str
amx_func_end
Pass the call

Plans: Add a little more support, and use dynamic array module to improve speed and such.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Reply


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 04:33.


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