Raised This Month: $51 Target: $400
 12% 

Transformer Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mateo10
Veteran Member
Join Date: Jan 2006
Old 09-12-2006 , 11:24   Transformer Mod
Reply With Quote #1

I've done a plugin, called Transformer Mod and i got problems with it.
This is the plugin:
Code:
#include <amxmodx> #include <fun> #include <cstrike> #include <amxmisc> public plugin_init() {     register_plugin("Transformer Mod", "1.1", "MaTTe")     new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3     register_menucmd(register_menuid("Which animal do you want?"), keys, "setModel")     register_clcmd("say modelmenu", "showModelMenu")     register_clcmd("say menu", "showModelMenu")     register_clcmd("say model", "showModelMenu")     register_event("ResetHUD", "hook_hud", "be") }    public hook_hud(id) {     set_task(0.2, "showModelMenu", id) } public showModelMenu(id) {     new menu[192]     new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3         format(menu, 191, "Which animal do you want?^n^n1. Spider^n2. Chicken^n3. Lobster^n4. Alien")     show_menu(id, keys, menu)     return PLUGIN_HANDLED } public setModel(id, key) {     if (key == 0)     {         cs_set_user_model(id, "models/spider.mdl")     } else if (key == 1) {         cs_set_user_model(id, "models/chicken.mdl")     } else if (key == 2) {         cs_set_user_model(id, "models/lobster.mdl")     } else if (key == 3) {         cs_set_user_model(id, "models/alien.mdl")     } } public plugin_precache() {     precache_model("models/spider.mdl")     precache_model("models/chicken.mdl")     precache_model("models/lobster.mdl")     precache_model("models/alien.mdl") }
This works fine.
BUT, when i add
Code:
set_user_health(id, "200")
under the cs_set_user_model (all of them) i get error in compilation.
can someone tell me how to make the set_user_health and set_user_speed to work?
mateo10 is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 09-12-2006 , 11:43   Re: Transformer Mod
Reply With Quote #2

set_user_health(id, 200)
and
public setModel(id, key)
{ switch(key){

case 0: ...
.
.
}
}

__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
mateo10
Veteran Member
Join Date: Jan 2006
Old 09-12-2006 , 14:29   Re: Transformer Mod
Reply With Quote #3

Ehh...
the { switch(key){
case 0: ... <---- what are the three dots for?
. <---Shall i write that
. <---or shall i dont bother
} <---writing the 2 }s
} <---at the end?
mateo10 is offline
s p l i t
Senior Member
Join Date: May 2006
Location: US, NC
Old 09-12-2006 , 21:14   Re: Transformer Mod
Reply With Quote #4

That's for you to insert your code for each case.
s p l i t is offline
Send a message via AIM to s p l i t Send a message via MSN to s p l i t
mateo10
Veteran Member
Join Date: Jan 2006
Old 09-13-2006 , 01:53   Re: Transformer Mod
Reply With Quote #5

Yes, but i dont understand what i shall put in the cases.
mateo10 is offline
s p l i t
Senior Member
Join Date: May 2006
Location: US, NC
Old 09-13-2006 , 20:21   Re: Transformer Mod
Reply With Quote #6

each one of the models that you are changing to
s p l i t is offline
Send a message via AIM to s p l i t Send a message via MSN to s p l i t
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 06:12.


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