Unusual effects
-------------------------------------------------------------------------
Because of VALVE restriction:
This plugin just add unusual effects on weapons, I don't have permission to add free unusual effects on hats, killstreak effects or australium items!
-------------------------------------------------------------------------
Last Change v2.19 (21/12/2015): Show log,
Change : .sp and .smx. Use TF2 Item DB now!
Description
I publish this little plugin, to help admins who want add unusual effects on their players, donors or admins.
Players can choose qualities and unusual effects on their items (level = 100 ). Plugin auto saves player data in SQL DB.
Players can show current effect by selecting in the menu "Show effects" and will go on this site :
http://bit.ly/l77777
How does it works ?
Write
!unusual and select what you want
on your current weapon.
Effects are
directly added or deleted!
Players can be limited by flags:- You can restrict the number of effects that a player with a flag (or without flag) can have, by editing unusual_permissions.cfg
- When a players lost his unusual effect flag, or has more effects than authorized by his flag, this plugin will delete all his effects!
- You can upgrade players, nothing will be deleted.
- You can restrict some unusual effects by editing flags in unusual_list.cfg
- If a player has an effect which need a flag to be used, it will lose his effect!
There is an
admin tools in the menu, which allow you to add effects on a connected player or remove an unusual effect from player in DB. [/LEFT]
There is a fix for FF2 and VSH mod:- If you run a FF2 server, this plugin will automatically block boss unusual effect update thanks to this enabled cvar : unusual_fix_ff2boss 1
- If you run a VSH server, you must force boss team, and use this CVAR to block unusual effect on this team : unusual_team_restriction
Command :
Admin Commands (flag generic) :
Code:
unusual_permissions // Update permissions
unusual_control //Control all player if they can still have unusual effects
Cvar :
Code:
unusual_team_restriction (def: 0 ) // 0 = no restriction, 1 = red, 2 = blue, can't have unusual effects
unusual_panel_flag (def: 0 ) // 0 = ADMFLAG_ROOT, 1 = ADMFLAG_GENERIC (Which flag can use it?)
unusual_fix_ff2boss (def: 1 ) // 0 = boss can have unusual effects, 1 = boss can't (Work only for FF2)
unusual_tag (def: 1 ) // 1 = Add 'unusual' tag, 0 = No
For Developer : Native functions
Spoiler
PHP Code:
/**
/**
* Remove a weapon unusual effect.
*
* @param SteamID Client SteamID.
* @param WeaponID Weapon Index.
*/
native bool:UE_RemoveEffect(String:SteamID[], WeaponID);
/**
* Remove all client unusual effects.
*
* @param SteamID Client SteamID.
*/
native bool:UE_RemovePlayerEffects(String:SteamID[]);
/**
* Get flag unusual effect number limit.
*
* @param flag FlagBit (ex : ADMINFLAG_ROOT), -1 = without flag.
* @return Unusual effect flag number limit, -1 = no limit, -2 if invalid FlagBit
*/
native UE_GetUnusualEffectPermission(flag);
/**
* Set flag unusual effect number limit.
*
* @param flag FlagBit (ex : ADMINFLAG_ROOT), -1 = without flag.
* @param limit limit.
* @return false if invalid FlagBit, true on success.
*/
native bool:UE_SetUnusualEffectPermission(flag, limit);
unusual_list.cfg
unusual_permissions.cfg
Warning: Due to an issue which we are not able to fix, only Valve can, I remove Gunslinger and Lollichop from the plugin.
Installation
unusual.smx in tf\addons\sourcemod\plugins
unusual.sp in tf\addons\sourcemod\scripting
unusual.inc in tf\addons\sourcemod\scripting\include
unusual.phrases in tf\addons\sourcemod\translations
unusual_list.cfg in tf\addons\sourcemod\configs
unusual_permissions.cfg in tf\addons\sourcemod\configs
If you want to use
MySQL, copy/paste this in sourcemod/configs/databases.cfg. Replace by your own data.
PHP Code:
"unusual"
{
"driver" "mysql"
"host" "YourHost"
"database" "YourDatabaseName"
"user" "Login"
"pass" "PassWord"
//"timeout" "0"
//"port" "0"
}
Else use
SQLite and do nothing.
Need SourceMod 1.7 or after
morecolors.inc
Tf2 Items (the last snapshot)
TF2 Items DB
If you want to convert your old database file (unusual_effects.txt) to the new DB SQLite or MySQL, You can use this tool : Unusual effects SQL converter
I'm alway open for any suggestion
Old versions http://bit.ly/1auTR2Z
Logs
Spoiler
Quote:
v 2.19
Use Tf2 Item DB instead of TF2 Item Info (Obsolete)
v 2.18.3
Fix loop due to a wrong slot returned by TF2II_GetItemSlot() for items 1547, 15003, 15016, 15044, 15047 (Enginneer ShotGun Festive and Gun mettle skins)
v 2.18.2
Fix loop due to a wrong slot returned by TF2II_GetItemSlot() for items 1547, 15003, 15016, 15044, 15047 (ShotGun Gun mettle skins)
v 2.18.1
Fix loop due to a wrong slot returned by TF2II_GetItemSlot() for item 1141 (Festive ShotGun)
v 2.18
Fix SQL request error when create table for the first time.
Remove cvar unusual_sql_waiting
Remove auto exec file unsual.cfg
Rewrite functions that generate effects on items:- Fix item regeneration loop
- Fix crash due to handle unusual_list.cfg update:- File structure changed to key value file
- You can now specify a flag restriction for an effect
- Add invasion unusual effects
Add cvar unusual_tag to add tag "unusual"
Update Shortcut URL to show effects
v 2.17.1
Fix an error which can appear when player item load and client left.
Fix an exploit which allow unusual effects on wearable items.
Remove warning sentence black listed item when item load.
v 2.17
Remove native functions :
UE_AddUnusualEffect
UE_IsUnusualItem
UE_GetUnusualItemQuality
UE_GetUnusualItemEffect
UE_GetUnusualItemNumber
Rewriting of database structure:
Now use MySQL or SQLite instead of unusual_effects.txt
unusual_effects.txt is not used and removed Udapte unusual effects:
Unusual Taunt Effects are now allowed!
Unusual Taunt Effects added in unusual_list.cfg Cvars Change:
Remove unusual_autoupdate
Remove unusual_controlmod
Add unusual_sql_wait Rewriting of Admin Tools system:
You can now remove unusual effects from unconnected player in DB.
Some fixes. Unusual Menu:
New option in delete effect menu, "All" to remove all effects. Remove updater extension.
Update translation file.
v 2.16.1
Now it works for sourcemod 1.6
v 2.16
Removed Gunslinger and Lollichop from allowed weapons. (Bug report by TonyBaretta)
If player not allowed, return him on the first menu.
Doesn't regenerate player health.
Doesn't regenerate weapon ammo and clip.
Fix a database corruption due to plugin restart.
Translations: Add Sent13, warning blacklisted weapon.
v 2.15.1
Fix unusual effect permission for players without flag (=0): Can now receive unusual effects.
Fix an Error 404 when plugin try to download an update.
Add 6 new halloween 2014 unusual effects.
v 2.15
Forget 2.14.9 version, I Update the 2.13 version.
Add 9 native functions.
Add 4 CVARS.
Add admin tools, to manage unusual effects in game.
Fix FF2 boss, now can't have unusual effects.
Add Updater plugin, to update easily plugin, and unusual effect list.
Update translations.
Update unusual effect names.
Works with BOTS.
v 2.14.90B
Now work with MySQL DB
Won't need unusual_permissions.cfg and unusual_effects.txt files
Works with BOTS
New quality add : Collector's
v 2.13
Fix ClassName with more of 32 characters that cause crash or weapon bug
Changing system to give unusual effects on weapon (more performance)
Add or delete unusual effects is applied directly (not necessary to go on inventory)
Fix wrench issue, you can now add unusual effects on it and spawn objects
v 2.12
Add Cvar
Add admin command
Some fix + fix admin flag issue
Less power needed
v 2.11
fix handle not closed
v 2.10
Give directly unusual effects.
Went players spawn / inventory, detect if are allowed
New file unusual_permissions.cfg : each flag defined a limitation
New file unusual_effects.txt : plugin save data on this file (tf2items_weapons.txt are now free !)
Change unusual effects names.
v 2.03
Change URL (now bit.ly, no pub, no bug)
Add new securities
Add a verification if players are still immune else lost all his effects
v 2.02
Add some new effects.
Creation of an unusual effects list with name and effect id that appear in the menu
Add a link to show currently unusual effects
v 2.01
Add new robot effets
Add translation file (Eng, Fr)
v 2.00
Use nowTF2 Items Info
Only particles on weapons.
Think to delete the old version !
v 1.00
Initial :
Unusual Hat, misc and weap
|
BEFOR REPPORT A PROBLEM:
Quote:
My server Crash when I add an unusual effect !
No effect appear when I had one !
Are you using the last TF2ItemManager Snapshot !?
|
Quote:
Effect Menu or delete Menu don't appear !
Are you using the last Database of TF2iDB !? If not, Update the Database !
|
Quote:
I can see my unusual effect just 1 sec, and it disappear when I'm at third person !
But others players can see my effects !
Thank Valve !
|