Raised This Month: $ Target: $400
 0% 

[help] with entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
QuickNet
Junior Member
Join Date: Jun 2010
Old 10-10-2010 , 07:48   [help] with entity
Reply With Quote #1

hello,
i have the number of my 'ent'.
i want to know who press it,

(for deathrun)

i got this:
PHP Code:
public pfw_killed(idattackershouldgib

    new 
classname[32
    
pev(attackerpev_classnameclassname31

    if (!
equal(classname"trigger_hurt")) 
        return 
HAM_IGNORED 

    client_print
(idprint_chat"KILLED BY TRIGGER HURT ent: %d"attacker
     
    return 
HAM_IGNORED 

how can i take the name who press the bottun?
QuickNet is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 10-10-2010 , 07:54   Re: [help] with entity
Reply With Quote #2

PHP Code:
new szName[32];
get_user_name(idszNamecharsmax(szName)); 
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
QuickNet
Junior Member
Join Date: Jun 2010
Old 10-10-2010 , 07:57   Re: [help] with entity
Reply With Quote #3

can you add your code to my code?
( i think this no work )
the code take the name but, the name who press the bottun?
QuickNet is offline
QuickNet
Junior Member
Join Date: Jun 2010
Old 10-11-2010 , 01:54   Re: [help] with entity
Reply With Quote #4

BUMP
QuickNet is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 10-11-2010 , 02:50   Re: [help] with entity
Reply With Quote #5

Code:
public pfw_killed(id, attacker, shouldgib) 
{ 
    new classname[32], name[32]
    pev(attacker, pev_classname, classname, 31) 
    get_user_name(id, name, 31)
    if (!equal(classname, "trigger_hurt")) 
        return HAM_IGNORED 

    client_print(id, print_chat, "KILLED BY TRIGGER HURT ent: %d", attacker) 
    client_print(id, print_chat, "KILLED BY %s", name)
    return HAM_IGNORED 
}  

__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
QuickNet
Junior Member
Join Date: Jun 2010
Old 10-11-2010 , 08:45   Re: [help] with entity
Reply With Quote #6

doesn't work..
that print my name..
i also tried to change
'trigger_hurt'
to
'func_door'
QuickNet is offline
QuickNet
Junior Member
Join Date: Jun 2010
Old 10-15-2010 , 21:25   Re: [help] with entity
Reply With Quote #7

BUMP
QuickNet is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 10-15-2010 , 21:47   Re: [help] with entity
Reply With Quote #8

What do you mean it print your name? Isnt' that what you want? The person who pressed the button? Or were you not the one who pressed it.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
QuickNet
Junior Member
Join Date: Jun 2010
Old 10-15-2010 , 22:05   Re: [help] with entity
Reply With Quote #9

Quote:
Originally Posted by nikhilgupta345 View Post
What do you mean it print your name? Isnt' that what you want? The person who pressed the button? Or were you not the one who pressed it.
no,
if someone kill me so that need to print he's name..
and that print my name..
[i wasn't pressed it]
QuickNet is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-16-2010 , 01:51   Re: [help] with entity
Reply With Quote #10

Quote:
Originally Posted by QuickNet View Post
BUMP
Don't bump until 2 weeks have passed since last post.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 10-24-2010, 11:42
QuickNet
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
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:19.


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