Raised This Month: $ Target: $400
 0% 

Need Help to change a plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mistmoehre
Member
Join Date: Jan 2005
Old 03-14-2006 , 13:15   Need Help to change a plugin
Reply With Quote #1

HI
First: I am a scripting Noob

I found a dawn nice plugin http://forums.alliedmods.net/showthread.php?p=178833
Usage: i_aim_good <user> <0|1> - makes user aim good


But i need a little change...
I need: i_aim_good <@all or user> <0|1>

I need it for my Knifeserver (cs 1.6), but with a funktion to give all players the good_aim. I know this from other amxx plugins..so u can write "amx_funktion @all"

Can anybody help me?


Sry for my bad english, but iŽam German.

PLZ help me

great thanks
Mistmoehre is offline
capndurk
Senior Member
Join Date: Feb 2006
Old 03-14-2006 , 13:36  
Reply With Quote #2

I think this should do it...

Code:
#include <amxmodx>  #include <amxmisc>  #include <fakemeta>  #include <engine>  new aiming_good[33];  public plugin_init() {     register_plugin("i aim good","0.13","Avalanche");     register_forward(FM_TraceLine,"fw_traceline");     register_concmd("i_aim_good","cmd_setaim",ADMIN_BAN,"<user|^"@all^"> <0|1> - makes user aim good");  }  public client_putinserver(id) {     aiming_good[id] = 0;  }  public cmd_setaim(id,level,cid) {     if(!cmd_access(id,level,cid,3))         return PLUGIN_HANDLED;     new arg1[32], arg2[32];     read_argv(1,arg1,31);     read_argv(2,arg2,31);     if(equali(arg1, "@all"))     {         for(new i = 0; i < get_maxplayers(); i++)         {             if(is_user_connected(i))             {                 if(str_to_num(arg2))                     aiming_good[i] = 1;                 else                     aiming_good[i] = 0;             }         }         console_print(id,"* All players %s aim good",(str_to_num(arg2)) ? "now" : "no longer");         return PLUGIN_HANDLED;     }     new player = cmd_target(id,arg1,10);     if(!player)         return PLUGIN_HANDLED;     if(str_to_num(arg2))         aiming_good[player] = 1;     else         aiming_good[player] = 0;     new playername[32];     get_user_name(player,playername,31);     console_print(id,"* %s %s aims good",playername,(str_to_num(arg2)) ? "now" : "no longer");     return PLUGIN_HANDLED;  }  public fw_traceline(Float:v1[3],Float:v2[3],noMonsters,id) {     if(!is_user_alive(id))         return FMRES_IGNORED;     if(!aiming_good[id])         return FMRES_IGNORED;     // get crosshair aim     new MyAim[3], Float:flMyAim[3];     get_user_origin(id,MyAim,3);     IVecFVec(MyAim,flMyAim);     // set crosshair aim     set_tr(TR_vecEndPos,flMyAim);     // get ent looking at     new ent, body;     get_user_aiming(id,ent,body);     // if looking at something     if(is_valid_ent(ent)) {         set_tr(TR_flFraction,0.1); // 1.0 == no hit, < 1.0 == hit         set_tr(TR_pHit,ent); // entity hit         set_tr(TR_iHitgroup,body); // bodypart hit     }     return FMRES_IGNORED;  }

AMXX File:
capndurk is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 03-14-2006 , 14:55  
Reply With Quote #3

Capndurk, Please provide the .sma and not the .amxx
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
capndurk
Senior Member
Join Date: Feb 2006
Old 03-14-2006 , 15:01  
Reply With Quote #4

I don't understand...

I did provide the .sma file... I printed it in code so you don't have to download it as a file.
capndurk is offline
Mistmoehre
Member
Join Date: Jan 2005
Old 03-14-2006 , 18:15  
Reply With Quote #5

OHHHHH YES... I LOVE U MAN !!!!

GREAT THANKS


Edit: I fund a little Problem... player they new connectet dont have the good_aim! Can u fix it too?
Mistmoehre 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 20:27.


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