Set Cvars everytime player joins
ANYONE STUMBLING UPON THIS: THE PLUGIN HAS BEEN CREATED, THANKS TO THE WONDERFUL NECAVI!
INSTRUCTIONS: put this in a script, call it what u want (necavi called it Spawn Commands, but i just called mine "cvars" to refresh changes in console quicker), compile and poot in ur plugins folder... also, create these 2 files in ur addons/sourcemod/configs folder :D configs/spawn_server_commands.cfg configs/spawn_client_commands.cfg proper usage: sm_command #[userid] <flags, toggles, whatever else u need to set goes here unless u dont need any...> <1> <slay> <red> <etc...> #[userid] IS EXACTLY, CHARACTER BY CHARACTER, what u write....not @ or !... its ment for necavi's program to fetch a client's steamid/userid every time they spawn/respawn PROtip: no the difference between a serverside cvar and client cvar (not like my noob mistake...) PHP Code:
[[old post stuff....if ur interested in reading it :P]] Edit: PLEASE SCROLL TO BOTTOM POST AFTER THIS; EVERYTHING ELSE IS JUST PERSONAL CRAPE We should have a plugin that sets target cvars automatically for your server when a player joins For example, if you want to use the addcond plugin... sm_addcond @all 11 <[[kritzkrieg (crits)]]> i cant seem to find a crits plugin with particle effects btw...it would be great if someone could please tell me which plugin does this for an allcrit server But besides that, it would be nice to have a plugin that sets cvars for each player that joins, unless there is some other method I don't know about that someone could generously offer me btw it could be used for sm_rof (rate of fire) too and target commands like that... So someone get working on it! Ty! Edit: Woh, 131 views! Come on, guys, one of you has to go know how to make this >_> I'm gonna try working on a draft, but I'm only a noob to scripting Sourcemod, so it'd be great if you guys could lead me in the right direction with this. Any help is appreciated! I can't wait till we have this. I know a couple of servers that need this too, and if you need it too, then get working .-. Btw, if anyone is nice enough to upload a draft/working script, I will forever honor you and your majestic generosity and I'll plaster your face all over my walls to remind me of how awesome you are (and your face). |
Re: Set Cvars everytime player joins
This should work for all crits:
PHP Code:
|
Re: Set Cvars everytime player joins
thank you so much! I'll give it a try right now :D
Edit: Oh wait, the hook event for player spawn-that's perfect! That's exactly what I was looking for to make an automated cvar setter/refresher plugin every time a player joins! |
Re: Set Cvars everytime player joins
It seems that after being healed by a medic the crits stop working. Could you show me how to fix that?
Probably with player_healedbymedic and localplayer_healed |
Re: Set Cvars everytime player joins
PHP Code:
Edit: What I'm aiming for is always having crits on Edit #2: after finally reading the sourcepawn documentation, now i see what I did wrong *facepalm Quote:
|
Re: Set Cvars everytime player joins
Use TFCond_CritOnWin instead, it doesn't get removed on heal.
|
Re: Set Cvars everytime player joins
Thank you so much!!!!!!
Edit: Hmm...it doesn't seem to give crits until a win... Can anyone direct me to a list of tfconds? |
Re: Set Cvars everytime player joins
I copied my response to another user from a different thread. I hope this clarifies what I'm looking for :)
Quote:
|
Re: Set Cvars everytime player joins
No one is posting here anymore <__>. Alright, I'll get to work on coding this; I spent all day reading the sourcepawn documentation and every possible tutorial on youtube. I guess I'll look at some similar plugins to get some ideas (aka steal, jk I'll give you credit xD). From what I've read, it seems that I could accomplish this by scanning for global convars... so my goal is to write a plugin that scans for cvars for plugins that you specify.
Another option is to find specific ConCmd's, turn them into global cvars, and paste them into the target plugin's script....which is trickier and probably won't work because I don't think you can edit .smx's and pasting them into .sp's are useless unless I could have them auto-recompiled and auto-replaced in the plugins directory... If any of that is feasible, could any of you experienced users give me a quick stamp of approval or reject it if I'm going to waste my time before I waste time :| But I think the simplest way is to create a config file that has a dependency on it's target plugins and mirrors functionality, which means it would duplicate the functions of the concmd's as convars! Then there would be no need to constantly re-enter "sm_random-client/admin-command" when a player wants to enable noclip every time he dies or an admin wants to drop ragdolls on all the players every 5 minutes (countless examples; not enough patience) Any advice from my fellow alliedmodders :? |
Re: Set Cvars everytime player joins
PHP Code:
|
| All times are GMT -4. The time now is 22:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.