Raised This Month: $ Target: $400
 0% 

variable=true on attacked


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-07-2006 , 11:39   variable=true on attacked
Reply With Quote #1

how would i set a variable to true on someone I attacked. Not someone shooting me but someone i shot at?
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-07-2006 , 11:47   Re: variable=true on attacked
Reply With Quote #2

Code:
new bool:mybool[33];

//

register_event("Damage" , "event_Damage" , "b" , "2>0");

//

public event_Damage(victim)
{
  //new attacker = get_user_attacker(victim);
  mybool[victim] = true;
}
__________________
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
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-07-2006 , 11:53   Re: variable=true on attacked
Reply With Quote #3

is victim pre-defined as person being attacked? cause i dont see where u defined that anywhere
P.S. v3x check ur PM's i sent you 2 of them
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 07-07-2006 , 12:39   Re: variable=true on attacked
Reply With Quote #4

You should use read_data() to get the victim. I forget whether it should be 1 or 2 as the param.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 07-07-2006 , 15:21   Re: variable=true on attacked
Reply With Quote #5

Quote:
You should use read_data() to get the victim. I forget whether it should be 1 or 2 as the param.
Damage event does not contain victim argument at all. Technically it's possible to do new victim = read_data(0) but in fact victim is the person who recieved the Damage message. So i do not see what's wrong in the code above.

Last edited by VEN; 07-07-2006 at 15:23.
VEN is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-07-2006 , 12:55   Re: variable=true on attacked
Reply With Quote #6

i like v3x's way better lol
__________________
DO NOT PM me about avp mod.
Rolnaaba 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 08:04.


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