Raised This Month: $ Target: $400
 0% 

I cant test this plugin right now


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
godlike
Senior Member
Join Date: Apr 2005
Old 12-09-2006 , 11:35   I cant test this plugin right now
Reply With Quote #1

hej , i made a simple plugin its called amx santa.Its just a plugin that will change a player into a santa model and it will give him speed , hp , armor , and a sexie glow. I cant test this right now because i dont have steam here.
I tried to download it but my comp is to slow for it .( win98 ) So i wanna ask you to try it out for me. the cvar is amx_santa nick (you will need the admin_cvar flag). place the player model at models/player/santa/santa.mdl .and please tell me if it works this is just beta need alot of changes probably. thank you for your time.
Attached Files
File Type: rar santa.rar (1.15 MB, 116 views)
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me

Last edited by godlike; 12-09-2006 at 11:38. Reason: forgot my attachment
godlike is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 12-09-2006 , 17:17   Re: I cant test this plugin right now
Reply With Quote #2

Right now your SetModel function won't effect the player you tell it to, it will effect the player calling the function. This is because, instead of grabbing the arguments passed and getting a user from it, you just use the id of the player who called it.

But, your model change won't work anyway. cs_set_user_model takes the name of the model, not the path. So, in this case, you would use the name "santa".

Here is how I would do it.

Code:
// we added level and cid, since they are also passed. // we use these to figure out if they have access. public SetModel(id,level,cid) {     // make sure they have access and that they put in arguments     if(!cmd_access(id,level,cid,2)) {         return PLUGIN_CONTINUE     }     // get the name they put in     new name[32]     read_argv(1,name,31)     // match the name to a player     new target = cmd_target(id,name,2) // flag 2 = allow yourself     // this player isn't here     if(!target) {         return PLUGIN_CONTINUE     }     // changed id (player calling function) to target (player targeted)     cs_set_user_model(target, "models/player/santa/santa.mdl")     set_user_health(target, 250)       set_user_armor(target, 500)     //set_user_rendering(target, kRenderFxNone, 0, 0, 0, kRenderNormal, percentage)     set_user_rendering(target, kRenderFxNone, 225, 0, 0, kRenderGlow, 100)     set_user_maxspeed(target, 640.0)         return PLUGIN_CONTINUE }

Also, you don't need to return anything in plugin_init or plugin_precache.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
godlike
Senior Member
Join Date: Apr 2005
Old 12-09-2006 , 18:52   Re: I cant test this plugin right now
Reply With Quote #3

Well thank you avalanche. like you see im just a noob in amx scripting still need to learn alot.
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me
godlike 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:02.


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