Raised This Month: $ Target: $400
 0% 

get_user_aiming, set view, maximum value


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LynX
Veteran Member
Join Date: Oct 2004
Old 04-04-2005 , 10:16   get_user_aiming, set view, maximum value
Reply With Quote #1

1. I made a script that would get what are you looking on. So, I made this:
Code:
public get_aiming(id) { new player, bodypart get_user_aiming(id, player, bodypart, 5) return PLUGIN_HANDLED }

Now, how can I check data of player on your looking on?
I mean, on player thing. This is first time I'm using it, so can you show me, how to, let's say, check the health of player looking at ( check health only if he's looking on valid player ).

2. How can I set view to another player using only AMXX?
I tried looking at Jedi Mind Control from Twilight Suzuka, but I couldn't figure it out....

3. How can I set maximum value for something? Let's say, restrict that users can't get over 50 health, or something... Can any1 show this?

Thanks.
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
Ced
Member
Join Date: Oct 2004
Old 04-04-2005 , 12:20  
Reply With Quote #2

1.
Code:
public get_aiming(id)  {      new player, bodypart, health      get_user_aiming(id, player, bodypart)      if(player) {         health  = get_user_health(player)      }else {         client_print(id, print_chat, "No Target found")      } return PLUGIN_HANDLED }

2.
Code:
engfunc(EngFunc_SetView, id, targetid)

3. make a infinite looping task that checks all players health and if any go above 50, change it to 50
Ced is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 04-04-2005 , 12:40  
Reply With Quote #3

First off, fun module? Whats with you people and using fun module?

second:
from engine:
Code:
 attach_view(id,tid)
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
LynX
Veteran Member
Join Date: Oct 2004
Old 04-04-2005 , 13:44  
Reply With Quote #4

Can you show me that kinda task loop?
Also, how could I disable that limit that's not integrated in mine plugin, its integrated in other?
Or, is there another way to set limit for that? Thanks.
And, 1 more thing, how can I make that if other player approaches to player which is using some function, on let's say 5 meters, it pushes him away 20 meters? So, that's basically push-away if closes on specified distance.
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
Ced
Member
Join Date: Oct 2004
Old 04-04-2005 , 14:05  
Reply With Quote #5

um, first I think this will work but not sure since i did not test
Code:
public plugin_init() {     set_task(0.1,"check_health",0,_ _,"b") } public check_health() {      new players[32],pNum,health      get_players(players,pNum,"a")      for(new i=0;i<pNum;i++) {           health = get_user_health(players[i])           if(health > 50)                set_user_health(players[i],50)      }      return PLUGIN_HANDLED }
And for second question, u would have to set their velocity and count how many meters they went, but i'm not experienced really with moving entities so i'll let somebody else post on that. Or u could keep setting their origin but that might b weird.

I remember runemod had a rune(kinetics) that pushed away the person if u want to look at that. And there was a jedi grab plugin with pushing in it.
Ced is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 04-04-2005 , 14:24  
Reply With Quote #6

Okay, I'll try it right now

Anybody for pushaway?
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
LynX
Veteran Member
Join Date: Oct 2004
Old 04-04-2005 , 15:50  
Reply With Quote #7

Well, it doesn't work. I think set_task shouldn't be used in plugin_init()
Anyway, what I'm trying to do is remove cvar. Is there any way to remove a cvar or to block it?

Still no pony or pushaway.
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
Ced
Member
Join Date: Oct 2004
Old 04-04-2005 , 16:03  
Reply With Quote #8

it works, just tested but i left out a comma by accident, here.
Code:
public plugin_init() {     set_task(0.1,"check_health",0,_,_,"b") } public check_health() {      new players[32],pNum,health      get_players(players,pNum,"a")      for(new i=0;i<pNum;i++) {           health = get_user_health(players[i])           if(health > 50)                set_user_health(players[i],50)      }      return PLUGIN_HANDLED }
Ced is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 04-05-2005 , 04:05  
Reply With Quote #9

Well, this works. But is there a way to set a limit on integer based thing?
Pushaway?
Remove cvar?
Thanks.
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
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 10:02.


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