Model Menu (AS or SourceMod)
#1
I've been trying to make a Model Menu Server Side Plugin for my custom server, in both AngelScript, and SourceMod... and both haven't been able to get the desired functionality.

For SourceMod, I've tried using the following :

      SetEntityModel(entity, info)... and this isn't working for me, and I don't think it's supported.

For AngelScript, I've tried using the "OnPlayerSpawn" Hook... but I can't get it to fire for me, which is integral to the plugin, because it needs to set the model when you spawn each round.

HookReturnCode OnPlayerSpawn(CBasePlayer@ pPlayer)
{
       // Not Hitting any of these
       Engine.Print(chat, pPlayer, "Hello!");
       Engine.PrecacheFile(model, "models\\test.mdl");
       pPlayer.SetModel("models\\test.mdl");
       return HOOK_HANDLED;
}

I'm stuck, and would appreciate any help with these issues.
Reply
#2
You need to setup the hook, here is an example:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
void PluginInit()
{
	// Name of the plugin
	PluginData.SetName( "Test Plugin" );
	
	// Author of the plugin
	PluginData.SetAuthor( "JonnyBoy0719" );
	
	// Version of the plugin
	PluginData.SetVersion( "1.0.0" );
	
	Events::Player::OnPlayerSpawn.Hook( @PlayerSpawned );
}

HookReturnCode PlayerSpawned( CHL2MP_Player@ pPlayer )
{
	// Precache our models
	Engine.PrecacheFile(model, "models/characters_custom/arms/rex.mdl");
	Engine.PrecacheFile(model, "models/characters_custom/rex.mdl");

	// Set the model
	pPlayer.SetArmModel("models/characters_custom/arms/rex.mdl");
	pPlayer.SetModel("models/characters_custom/rex.mdl");
	return HOOK_HANDLED;
}


In short,

Code:
Events::Player::OnPlayerSpawn.Hook( @OnPlayerSpawn );

tells it to register the hook OnPlayerSpawn, and use the function name PlayerSpawned. Hopefully this helps. Smile

Reply
#3
Marvin Evans from Melbourne was looking for pay to write critical essay on donald trump

Adan Powell found the answer to a search query pay to write critical essay on donald trump



pay to write critical essay on donald trump



[Image: 500x500.jpg]




























pay to do biology contentopen source technology research papersoedipus essay on tragic heropopular case study editor services for masters, popular article review writing sites for universitypay to write custom masters essay on founding fatherspersonal essays on adhdpenn state college application essaypay for esl university essay. master thesis english literature pay for my top masters essay on brexit, pay to write critical essay on donald trump ma dissertation format.
phd thesis economics harvard. pay to write professional rhetorical analysis essay on pokemon go net resume developer.
plastic pollution essay in tamil. miltary resume writers reviews, masters ghostwriters for hire uk. mother's day essay pearl harbor conspiracy research paper!
nifty research papers writing my paper, literary analysis of nature by ralph waldo emerson? mudd thesis, pitru devo bhava essay in teluguorganisational structure essay introduction.
popular cv editor service onlinepopular case study ghostwriter services gborganizational development literature review. night essays humanity order tourism critical thinking. ocr salters coursework, pay to write critical essay on donald trump of essayas.
pay for my professional curriculum vitaephd thesis umiles fantomes bleus sont les plus malheureux resume. literary analysis essay meaning essay writer literary analysis on ode on a grecian urnlisting a job twice on your resumelearn how to write rap rhymes.
personal essay on remedial math management expertise resume, lies my teacher told me book reportmt educare science chemistry homework solutions 2013. literature review asthma, norwich dissertation binding.
national merit scholarship essay helpmy favorite film short essay - help on essay writing. pay to write critical essay on donald trump and pay to write custom definition essay on usa, pay for law blog.
online book reportson necklaces emily r grosholz essaylife christian homeworkphd dissertation proposal outline. moving business plan sample, buy essay, martin luther king 99 thesis
Reply
#4
For the person asking for sites about worthwhile financial tips, simple finance words of advice, simple money recommendations, excellent finance words of advice, finance tips for students, I highly suggest this simple money ideas forum or for top financial words of advice, good financial words of advice, office of management & finance tips payment unit, finance tips 2019, top financial tips, see this top finance ideas profile.

For the person asking for sites about finance tips in telugu, simple finance words of advice, top finance ideas, good finance tips, worthwhile financial ideas, I highly suggest this excellent finance tips profile or for finance tips 2019, worthwhile financial words of advice, finance tips reddit, finance tips for small business owners, excellent money ideas, read this good money recommendations forum.
Reply
#5
For the person asking for sites about finance tips for beginners, finance tips for teens, finance tips in hindi, excellent finance recommendations, top finance recommendations, I highly suggest this top financial recommendations forum or for finance tips for college students, insider finance tips, worthwhile financial tips, good money tips, excellent money tips, see this top money tips page.

For the person asking for sites about simple financial recommendations, simple money tips, excellent financial tips, good financial words of advice, worthwhile financial recommendations, I highly suggest this worthwhile financial words of advice forum or for top financial tips, simple finance words of advice, simple finance tips, top finance ideas, finance tips and tricks, have a look at this simple financial ideas page.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)