Raised This Month: $ Target: $400
 0% 

Scripting Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 11-12-2006 , 18:28   Scripting Help
Reply With Quote #1

Could anyone help me find the errors. I cannot seem to find them. Any suggestions.

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> #define PLUGIN "amx_model" #define VERSION "1.01b" #define AUTHOR "Da_sk8rboy" public plugin_init() {          register_plugin(PLUGIN, VERSION, AUTHOR)      register_concmd("amx_model", "cmd_model", ADMIN_SLAY, "<target>") } public cmd_model(id, level, cid) {      if (!cmd_access(id, level, cid, 3))         return PLUGIN_HANDLED cs_set_user_model(players[i], "lobster")         }                }           }      } else {           new player = cmd_target(id, Arg1, 1)           if (!player)           {                console_print(id, "[Model Mod], player %s could not be found or targetted!", Arg1)                return PLUGIN_HANDLED           } else {              cs_set_user_model(player, "lobster")           }      }        return PLUGIN_HANDLED          } public plugin_precache() {      precache_model("models/player/lobster/lobster.mdl") }
__________________
i stop around here and there.

Last edited by Da_sk8rboy; 11-12-2006 at 20:55.
Da_sk8rboy is offline
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 11-12-2006 , 18:43   Re: amx_model 1.01b + amx_hp 1.00a Help!
Reply With Quote #2

I know that the problem is on line 22, just cant figure out what to do with it.
__________________
i stop around here and there.
Da_sk8rboy is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 11-12-2006 , 18:56   Re: amx_model 1.01b + amx_hp 1.00a Help!
Reply With Quote #3

On line 22 the problem is you haven't "defined" players[i].

Your passing invalid id's.
organizedKaoS is offline
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 11-12-2006 , 19:03   Re: amx_model 1.01b + amx_hp 1.00a Help!
Reply With Quote #4

How should i define it?

Code:
cs_set_user_model(player,"lobster");
__________________
i stop around here and there.

Last edited by Da_sk8rboy; 11-12-2006 at 19:19.
Da_sk8rboy is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 11-12-2006 , 22:41   Re: Scripting Help
Reply With Quote #5

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> #define PLUGIN "amx_model" #define VERSION "1.01b" #define AUTHOR "Da_sk8rboy" public plugin_init() {             register_plugin(PLUGIN, VERSION, AUTHOR)         register_concmd("amx_model", "cmd_model", ADMIN_SLAY, "<target>") } public cmd_model(id, level, cid) {         if (!cmd_access(id, level, cid, 2))                 return PLUGIN_HANDLED                 new Arg1[32]         read_argv(1, Arg1, 31)         new player = cmd_target(id, Arg1, 0)         //Flags:         //1 - obey immunity         //2 - allow yourself         //4 - must be alive         //8 - can't be bot                 if (!player)         {                 console_print(id, "[Model Mod] player %s could not be found or targetted!", Arg1)                 return PLUGIN_HANDLED         }         else         {                 cs_set_user_model(player, "lobster")         }         return PLUGIN_HANDLED } public plugin_precache() {         precache_model("models/player/lobster/lobster.mdl") }
__________________
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
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:51.


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