adding models to your plugin
i want to be able, when i use my plugin command,
EX: amx_hp <target> <hp> To make the target to turn into a model, i have the model i want to use i just dont know what i would put in my script to make it on the plugin. Also heres my script, if its possible could someone tell me where the model script would go? Code:
/* Plugin generated by AMXX-Studio */ |
Re: adding models to your plugin
After each of your set_user_health's, add:
Code:
|
Re: adding models to your plugin
hmm i always forget to do this but thanks for reminding me Avalanche
|
Re: adding models to your plugin
Hey g3x ;)
|
Re: adding models to your plugin
Oh ok avalanche, like this?
Code:
set_user_health(player, Health)Code:
cs_set_user_model(players[i],"modelname");Code:
set_user_health(player, Health) |
Re: adding models to your plugin
Where would the changes go if i wanted to put the .mdl in there?
Code:
/* Plugin generated by AMXX-Studio */[ |
Re: adding models to your plugin
Code:
But you also have to precache it, so that players who don't have the model yet will be forced to download it. So add this somewhere: Code:
And of course change the "spiderman"s throughout the code to the name of the model you are using. |
Re: adding models to your plugin
Quote:
also so do i put the model in my models/player/ folder? |
Re: adding models to your plugin
You can place it anywhere. Most people place it underneath of plugin_init. Also, you have to create a folder in models/player/ that is the name of the model. So if the file was named "spiderman.mdl", you would create a folder named "spiderman" in models/player/, and then place the model file in there. So the final path would be "models/player/spiderman/spiderman.mdl"
|
Re: adding models to your plugin
ok avalanche, final question, before i even tested the plugin with the spiderman.mdl
it was just a hp giver basically. but anyways i would use my command on the target and it would not only work but it would kill everyone in his team. Any suggestions, something obviously has to be scripted wrong, but not sure wat. so if you could help it would be much appreciated :D Thnx, HeadxShot |
| All times are GMT -4. The time now is 04:53. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.