View Single Post
Author Message
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 11-26-2015 , 23:25   [CS:GO] Hats (with editor menu and 3rd person)
Reply With Quote #1

Demostration video:


btw, not laugh much of my horrible speaking english xD

Test server:


Description

Hats plugin with these features:
  • All the default csgo hats included (not download needed)
  • Auto download custom hats files
  • 3rd person camera (with front-view) when you have the !hats menu or the !editor menu opened (for can see your hat)
  • Advanced editor for change the position and angle of the hat and save it in the file
  • Your hat selection is saved using clientprefs
  • On the model change event, you hats are refreshed (Compatible with skinchooser plugins, zombie servers, etc)


Requeriments:

Dhooks


Configuration:

You can add more hats in the addons/sourcemod/configs/franug_hats.txt file with this format
Code:
	"Hat name"
	{
		"model"		"hat route"
		"attachment"		"attachment used from the model, for example facemask or forward. (facemask by default)"
		"position"		"hat position"
		"angles"		"hat angles"
		"bonemerge"		"Bonemerge hat to the playermodel. Enabled = 1. Disabled = 0 (default = 0)"
		"flag"		"admin flag required for use this model. Leave in blank for public access (public access by default)"
		"hide"		"Hide hat model in first person view. Enabled = 1. Disabled and less cpu usage = 0 (default = 1)"
	}
Example:
Code:
	"White wings"
	{
		"model"		"models/shop/wings/white.mdl"
		"position"		"-1.500000 -6.500000 -11.500000"
		"angles"		"-65.000000 170.000000 0.000000"
		"hide"		"0"
	}
	"Santa"
	{

		"model"		"models/player/holiday/santahat.mdl"
		"attachment"		"facemask"
		"position"		"-1.500000 -4.500000 0.000000"
		"angles"		"-2.500000 12.500000 13.000000"
		"flag"		"b"
	}

Cvars:
Put in server.cfg
Code:
sm_franughats_thirdperson "1" // Enable/disable third-person while using "sm_hats" or "sm_editor"

Commands:

!hats - open the hats menu
!editor - open the editor menu for change the angle and position of the a hat (Root admin flag required)
!reloadhats - Reload hats configuration. You should change map if you add new hats models (Root admin flag required)


Todo list:

-More optimized


Changelog:

Code:
Version 3.2
  • -Hide radar on third-person view
  • -Hide crosshair on third-person view
Version 3.1
  • -Added support for differents angles and positions depending of the player models
  • -Some fixes
Version 3.0
  • -Now the plugin use the New API and Syntax
Version 2.4.1
  • -Fixed some small issues
Version 2.4
  • -Fixed finally the crashes with bots
  • -Optimizations
Version 2.3
  • -Optimizations in the SDKHook_SetTransmit function.
  • -Added new "hide" value to the configuration file for dont use SDKHook_SetTransmit if not needed (less cpu usage). Check it in the example of the first post.
  • -Added one new ConVar (see below).
  • -Added a translation file.
  • -Improved the flags system.
  • -Fixed a crash with bots.
  • -New cvar sm_franughats_thirdperson "1" - Enable/disable third-person while using "sm_hats" or "sm_editor"
Version 2.2
  • -Removed gamedata dependency and now the plugin works in Windows servers too.
  • -Fixed that sometimes the hat not appear in player spawn.
Version 2.1
  • -A lot of optimizations
  • -Now on the model change event, you hats are refreshed (Compatible with skinchooser plugins, zombie servers, etc)
  • -Added flag support for each hat (see the example cfg in the first post)
  • -Fixed some bugs
  • -Now the 3rd person camera have front-view support always
  • -Added new command !reloadhats - Reload hats configuration. You should change map if you add new hats models (Root admin flag required)
  • Now Dhooks is required

Donations (optional):

If you apreciate my work, you can donate me via paypal or with a trade offer


Download:

Main repository
Direct download
Code changes
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 04-13-2019 at 11:06.
Franc1sco is offline
Send a message via MSN to Franc1sco