Raised This Month: $ Target: $400
 0% 

Kill-Look


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BetaX
Member
Join Date: Nov 2005
Old 11-12-2005 , 23:38   Kill-Look
Reply With Quote #1

OK, first plugin here...

Right now, the plugin can be used by everyone (not restricted from people with no-admin) and it runs only once, meaning you have to type it in while looking at someone to kill them.

This is not practical.

I want it to allow the person to run around and be able to kill people.

Here's the Source.

Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "Look-Kill" #define VERSION "1.2" #define AUTHOR "BetaX" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_concmd("amx_killlook","handle_look",ADMIN_KICK,"Kills anyone you look at. :O") } public handle_look(id) {     new entid, entbody;     get_user_aiming (id,entid,entbody,99999);     user_kill (entid,0);     return PLUGIN_HANDLED; }
BetaX is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-12-2005 , 23:48   Re: Kill-Look
Reply With Quote #2

Quote:
Originally Posted by BetaX
Right now, the plugin can be used by everyone
Right now it appears that the command requires ADMIN_KICK to use.

Quote:
Originally Posted by BetaX
I want it to allow the person to run around and be able to kill people.
Simply bind a key to amx_killlook.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-12-2005 , 23:49  
Reply With Quote #3

Code:
public handle_look(id,level,cid) {     // check the player's access     if(!cmd_access(id,level,cid,0))         return PLUGIN_HANDLED;     new entid, entbody;     get_user_aiming (id,entid,entbody,99999);     // make sure the player is alive and is on the opposite team of the person using the command     if(is_user_alive(entid) && (get_user_team(id) != get_user_team(entid))         user_kill(entid,0);     return PLUGIN_HANDLED; }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-12-2005 , 23:49  
Reply With Quote #4

Was editing my post about cmd_access when v3x posted, nevermind.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-12-2005 , 23:52  
Reply With Quote #5

I didn't see your post at the time ;]
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
BetaX
Member
Join Date: Nov 2005
Old 11-12-2005 , 23:52  
Reply With Quote #6

Thanks guys, but this still doesn't fix the fact that it doesn't kill more than once and only if you enter it when looking at them.

Binding it seems like the easy way out.

I tried making a while loop... but that doesn't work.
BetaX is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-13-2005 , 01:05  
Reply With Quote #7

You want to make it kill whoever you look at no matter what?

Code:
#include <fakemeta>  public plugin_init() {     register_forward(FM_TraceLine,"fw_traceline");  }  public fw_traceline(Float:v1[3],Float:v2[3],noMonsters,id) {     if(is_user_alive(id)) {        new hit = get_tr(TR_pHit);        if(is_user_alive(hit)) user_kill(hit,0);     }  }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Reply


Thread Tools
Display Modes

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 23:54.


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