Raised This Month: $ Target: $400
 0% 

model changer ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
neogeo
Senior Member
Join Date: Jul 2005
Old 01-02-2007 , 15:36   model changer ?
Reply With Quote #1

HI
it's for soccerjam :
i've a model of goalkeeper.
i want that if a player types /keeper , he will have the model and if he types /unkeeper , he will have normal model.
only 1 player per team can have it (in t keeper has glow red and in cs keeper has glow blue).
if you can do that .
thanks
neogeo is offline
Imanoobie
BANNED
Join Date: Sep 2006
Old 01-02-2007 , 18:16   Re: model changer ?
Reply With Quote #2

Im doing this right now

EDIT: Ok got some probs with the code :S

If you wanna help out go here: http://forums.alliedmods.net/showthr...917#post422917
Or download the source here: Attachment 12994

Last edited by Imanoobie; 01-02-2007 at 18:46.
Imanoobie is offline
neogeo
Senior Member
Join Date: Jul 2005
Old 01-03-2007 , 04:02   Re: model changer ?
Reply With Quote #3

thanks
i will try
neogeo is offline
Imanoobie
BANNED
Join Date: Sep 2006
Old 01-03-2007 , 05:33   Re: model changer ?
Reply With Quote #4

Ok, stupok69 did it

Code:
#include <amxmodx> #include <cstrike> #include <fun> new bool:T_keeper new bool:CT_keeper new bool:user_is_keeper[33] #define PLUGIN "Keeper plugin" #define VERSION "1.0" #define AUTHOR "Imanoobie" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_clcmd("say /keeper","cmdKeeper")     register_clcmd("say /unkeeper","cmdUnKeeper") } public plugin_precache() {     precache_model("player/keeper/keeper.mdl") } public cmdKeeper(id) {     new CsTeams:userteam = cs_get_user_team(id)         if(user_is_keeper[id])     {         client_print(id, print_chat, "Sorry, you are already the keeper, lol")         return PLUGIN_HANDLED     }         new name[32]     get_user_name(id, name, 31)         if(userteam == CS_TEAM_CT)     {         if(!CT_keeper)         {             CT_keeper = true             user_is_keeper[id] = true                         set_hudmessage(0, 0, 255, -1.0, 0.2, 0, 6.0, 12.0, 0.0, 0.0, -1) //-1.0??? Test it             show_hudmessage(0, "%s \n have become the CTs goalkeeper!", name)                         cs_set_user_model(id, "keeper")                         set_user_rendering(id,kRenderFxGlowShell,0,0,255,kRenderNormal,16)         }         else         {             client_print(id, print_chat, "Sorry, someone else is already a keeper for your team")         }     }     else     {         if(!T_keeper)         {             T_keeper = true             user_is_keeper[id] = true                         set_hudmessage(255, 0, 0, -1.0, 0.2, 0, 6.0, 12.0, 0.0, 0.0, -1)             show_hudmessage(0, "%s \n have become the Ts goalkeeper!", name)                         cs_set_user_model(id, "keeper")                         set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,16)         }         else         {             client_print(id, print_chat, "Sorry, someone else is already a keeper for your team")         }     }         return PLUGIN_HANDLED } public cmdUnKeeper(id) {     new CsTeams:userteam = cs_get_user_team(id)         if(!user_is_keeper[id])         return PLUGIN_HANDLED         new name[33]     get_user_name(id, name, 32)         if(userteam == CS_TEAM_CT)     {         CT_keeper = false         user_is_keeper[id] = false                 set_hudmessage(0, 0, 255, -1.0, 0.2, 0, 6.0, 12.0, 0.0, 0.0, -1)         show_hudmessage(0, "%s \n is not CTs goalkeeper anymore!", name)                 cs_set_user_model(id, "gign")                 set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,16)     }     else     {         T_keeper = false         user_is_keeper[id] = false                 set_hudmessage(255, 0, 0, -1.0, 0.2, 0, 6.0, 12.0, 0.0, 0.0, -1)         show_hudmessage(0, "%s \n is not Ts goalkeeper anymore!", name)                 cs_set_user_model(id, "terror")                 set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,16)     }         return PLUGIN_HANDLED }

...or download as an attachement...
Attached Files
File Type: sma Get Plugin or Get Source (amx_keeper.sma - 788 views - 2.5 KB)
Imanoobie is offline
neogeo
Senior Member
Join Date: Jul 2005
Old 01-03-2007 , 06:03   Re: model changer ?
Reply With Quote #5

the model must be in cstrike/player/keeper
me i want that the model will be in cstrike/models/player/keeper
you can help me ?
thanks
neogeo is offline
neogeo
Senior Member
Join Date: Jul 2005
Old 01-03-2007 , 06:48   Re: model changer ?
Reply With Quote #6

hi
i find few bug :
-when you are in ct and you change team to t , the skin will not change ( you are in t with ct skin) and vice versa
-when you are keeper in ct and change team t , the skin will not change (you are in t with keeper skin but t can choose to be keeper so you will have 2 keeper in 1 team)
- what is "\n"
see picture http://neogeosnk20.free.fr/soccerjam/gk%20bug.JPG
ps : i use autoteambalance
request :
when you type /keeper and /unkeeper i want that players can see in chat text /keeper and /unkeeper.
neogeo is offline
neogeo
Senior Member
Join Date: Jul 2005
Old 01-04-2007 , 06:24   Re: model changer ?
Reply With Quote #7

up
neogeo is offline
Imanoobie
BANNED
Join Date: Sep 2006
Old 01-04-2007 , 14:17   Re: model changer ?
Reply With Quote #8

Well i tryed to fix the first two bugs, not sure if its working...

As for your suggestions, i think i made it


EDIT: Updated author - Added stupok69

Pie:
Attached Files
File Type: sma Get Plugin or Get Source (amx_keeper.sma - 784 views - 3.0 KB)

Last edited by Imanoobie; 01-04-2007 at 16:25.
Imanoobie is offline
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 01-04-2007 , 14:22   Re: model changer ?
Reply With Quote #9

You say stupok69 did it yet you haveyourname as the author?
Code:
#define AUTHOR "Imanoobie"
Please correct me if I am wrong.
Ether way, Your original code was not the best. . .
I think you should put stupok69 as the author. See as is he almost redid the whole code.
__________________
i stop around here and there.

Last edited by Da_sk8rboy; 01-04-2007 at 14:29.
Da_sk8rboy is offline
Imanoobie
BANNED
Join Date: Sep 2006
Old 01-04-2007 , 16:23   Re: model changer ?
Reply With Quote #10

I made the base code..but he can have a place in the author line ;)
Imanoobie is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode