Raised This Month: $51 Target: $400
 12% 

Plugin request!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DJT
Member
Join Date: May 2013
Old 12-10-2014 , 15:51   Plugin request!
Reply With Quote #1

Hey all.

Im looking to create a plugin that executes other plugins. (Sounds weird)

For example the command sm_resize (name) (size).. I would like to create a command that is already filled.

So basically "sm_resize (The guy that excites this plugin) 2" and the command would be to "sm_resizemebig"

Or "sm_gravity (The guy that excites this plugin) .5" Would be something like
sm_lowgravme

Basically i need a plugin that executes other plugins for the player that typed it in. I would like it user-friendly so i can add to the commands that people can type in with a certain flag.

Please let me know if you can help with this plugin.
Thanks
DJT
DJT is offline
Robin955
Veteran Member
Join Date: Jun 2013
Old 12-10-2014 , 16:57   Re: Plugin request!
Reply With Quote #2

you mean create a plugin that executes other commands right?

and this basically "sm_resize (The guy that excites this plugin) 2" and the command would be to "sm_resizemebig"

so ur saying u want new sm_commands that has a fixed value in it already so its more user friendly and less confusing?

and gravity is not 1.0 it starts on 800 and then goes down.
Robin955 is offline
DJT
Member
Join Date: May 2013
Old 12-11-2014 , 06:45   Re: Plugin request!
Reply With Quote #3

Yes That it. And just the person that types in "sm_resizemebig" would get resized. Is there an easy way of coding that? Can you give me an example of code if that is possible.
DJT is offline
Equiment
AlliedModders Donor
Join Date: Feb 2014
Old 12-11-2014 , 06:53   Re: Plugin request!
Reply With Quote #4

Public onpluginstart() regadmincmd("sm_resizemebig", fireside, admflag_custom1);

Public action:fireside(client,args) servercommand("sm_resize #%d 2.0", client);

Wrote via mobile
Equiment is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-11-2014 , 07:22   Re: Plugin request!
Reply With Quote #5

I think he wants something where he can bind his own commands to other commands dynamically without having to edit a plugin.

It could be done without registering a concommand and instead using a commandlistener, and listening for what you want, but it's not what you should be doing
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
DJT
Member
Join Date: May 2013
Old 12-11-2014 , 11:31   Re: Plugin request!
Reply With Quote #6

my goal with this is so if i start having mod on my server i can set certain commands they can have and the can only execute it on them self and from a certain integer.

I will try that code above
Thanks guys
DJT is offline
DJT
Member
Join Date: May 2013
Old 12-11-2014 , 11:46   Re: Plugin request!
Reply With Quote #7

So would it be something like this?
#include <sourcemod>

public OnPluginStart()
{
RegAdminCmd( "sm_resizebig:TryAgain",fireside, adminflags_custom5);
Public action:fireside(client,args) servercommand("sm_resize #%d 2.0", client);
return Plugin_Handled;
}
DJT is offline
Equiment
AlliedModders Donor
Join Date: Feb 2014
Old 12-11-2014 , 18:41   Re: Plugin request!
Reply With Quote #8

Wrong, in onpluginstart only regadmincmd. Test my code
Equiment is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-12-2014 , 04:02   Re: Plugin request!
Reply With Quote #9

in your own console
bind p "sm_resize @me 2.0"
Bacardi is offline
DJT
Member
Join Date: May 2013
Old 12-12-2014 , 09:27   Re: Plugin request!
Reply With Quote #10

After compiling it as it was i got 2 errors

/groups/sourcemod/upload_tmp/textchn8Op.sp(1) : error 010: invalid function or declaration
/groups/sourcemod/upload_tmp/textchn8Op.sp(3) : error 010: invalid function or declaration

2 Errors.

I don't have to much experience with coding just started programing in collage 3 mouths ago.
DJT is offline
Reply



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 10:19.


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