Lua Questions ?

Ok this thread is all about any lua questions, hopfuly this thread should help you and others.

Ok I have a question.
On my gamemode Dark Rp 2.3.7 there is a file called sharde.lua, I edit this alot for the charactors and when I make one with a model that another server used, alot of the time the model doesn’t move, but you do. In other words, The model stands there like a statue but can still move. Why is it happening and can we solve it ?
Thanks

You probably have it clientside but not on the server. That or it’s in NPC animation format.

The Newbie Questions section is for lua questions.

So how to solve it ?

By posting the code so as we actually see what you messed up.

You must also make sure that you’re using a player model, and not an npc models.

Player models are usually in the players folder.

AddExtraTeam( “Army Surplies”, Color(0, 0, 50, 255), “model\Human/Group03m/Male_08.mdl” , [[
Your job is simple, all
you need to do is surply
the Army or any Autherised
personel with the weapons
reqired,]], {}, “surply”, 2, 100, 0, 0, true, false)

And

TEAM_NINJA = AddExtraTeam( “Ninja”, Color(255, 127, 63, 255), “models/player/t_artic.mdl” , [[
Your the highest rank of
people who can cloack up
and is very trained, You
have been through the
boring life of just walking
around being noticed but
now it’s over.]], {“Assassins_Knife”,“ls_sniper”,“lockpick”,“weapon_twitch_ak47”,“weapon_twitch_deagle”}, “ninja”, 1, 80, 0, 1, false, false)

And

TEAM_THEIF = AddExtraTeam( “Theif”, Color(0, 200, 165, 255), “models/odessa.mdl” , [[
I cant even explain about you
, It’s horrible you little
thief, well anyway since your
a thief just so steal some things >:(]], {“lockpick”,“Assassins_Knife”,“weapon_twitch_deagle”}, “theif”, 2, 75, 0, 0, false, false)TEAM_SPY = AddExtraTeam( “Spy”, Color(255, 255, 255, 255), “models/player/t_leet.mdl” , [[
Your the town spy, Make a spy
hut underground and as anybody
finds you and commands you,
you will do as asked, for the
money. Your can also be known
as a hitman but in descrise.]], {“Assassins_Knife”,“weapon_twitch_usp”}, “spy”, 1, 90, 0, false, true, TEAM_NINJA)

And loads more of em

Please use [lua] tags in the future, and it is as I just told you. :smile:

“models/odessa.mdl” is not a player model, that one is an NPC. Same goes for this one : “model\Human/Group03m/Male_08.mdl”

You have to use the player equivalent, when one exists.

If it doesn’t come in player model format, you’re SOL unless you want to get/code a NPC animations script yourself.

So were do I find the right one

Open the Garry’s Mod GCF and look for the models/players folder. All models you can use (appart from addon ones) are there.

For example “models/odessa.mdl” becomes “models/player/odessa.mdl”.

I think all of the default models are listed here too : http://wiki.garrysmod.com/?title=Player_manager.TranslatePlayerModel

Thank you so much my friends will be happy because am doing the lua for his server and… Just thank you :slight_smile: So helpfull

[editline]07:57PM[/editline]

Anyway now I know all this I just need to see the models without opening gmod, can anybody tell me a good model vuer programm thats free ?

Source SDK?

Oh yea, Sorry am getting carried away now

[editline]08:02PM[/editline]

Then again you cant see the content of the GSF can you ?

Yes you can. Configure the SDK for GMod using the guide on FPSBanana, plus use the preset configurations for the games you want to view the models from. Simple.

Ok It’s all set up but I cant find the location in the GSF file like I go onto the model vuer then I press load model it starts in the model file and there is no Player file only the one that you can normaly see inside the garrysmod folder ?

I would check, but I haven’t installed Source SDK on my laptop yet. I’m sure it works though.

Yeah it just doesn’t show the GSF content in there

For one, it’s GCF. Secondly, I’m pretty sure it does. If it doesn’t, extract the contents of the GCF to your GMod folder, then you can view them in the case that it doesn’t.

Thank you