Raised This Month: $ Target: $400
 0% 

classname


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
usaexelent
Senior Member
Join Date: Nov 2009
Location: Lithuania
Old 08-07-2011 , 11:22   classname
Reply With Quote #1

How can i get entitys classname, By classname I mean func_door
usaexelent is offline
Send a message via Skype™ to usaexelent
bibu
Veteran Member
Join Date: Sep 2010
Old 08-07-2011 , 11:43   Re: classname
Reply With Quote #2

http://www.amxmodx.org/funcwiki.php?go=func&id=344 ?
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
usaexelent
Senior Member
Join Date: Nov 2009
Location: Lithuania
Old 08-07-2011 , 12:04   Re: classname
Reply With Quote #3

I want the other way around.I want that i could get classname from ent index
usaexelent is offline
Send a message via Skype™ to usaexelent
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 08-07-2011 , 13:51   Re: classname
Reply With Quote #4

Code:
new classname[32] pev( entity_index, pev_classname, classname, charmax( classname ) )
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
usaexelent
Senior Member
Join Date: Nov 2009
Location: Lithuania
Old 08-07-2011 , 14:20   Re: classname
Reply With Quote #5

Why doesn't this work?
new classname[32]
pev( id, pev_classname, classname, charmax( classname ) )
new ent = -1
client_print(id, print_chat,"[debug] hit=%d; start=%d,%d,%d; end=%d,%d,%d; class=%i", hit, iStart[0], iStart[1], iStart[2], iEnd[0], iEnd[1], iEnd[2],classname[32]) // remove on final version
while(ent = find_ent_in_sphere( id, iEnd, 200.0 ))
{
if(is_valid_ent(ent))
dllfunc( DLLFunc_Use, ent, 0 );
}
usaexelent is offline
Send a message via Skype™ to usaexelent
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-07-2011 , 21:36   Re: classname
Reply With Quote #6

Quote:
Originally Posted by usaexelent View Post
Why doesn't this work?
new classname[32]
pev( id, pev_classname, classname, charmax( classname ) )
new ent = -1
client_print(id, print_chat,"[debug] hit=%d; start=%d,%d,%d; end=%d,%d,%d; class=%i", hit, iStart[0], iStart[1], iStart[2], iEnd[0], iEnd[1], iEnd[2],classname[32]) // remove on final version
while(ent = find_ent_in_sphere( id, iEnd, 200.0 ))
{
if(is_valid_ent(ent))
dllfunc( DLLFunc_Use, ent, 0 );
}
It doesn't compile.

Code:
charsmax()
client_print(0, print_chat, "%s", classname)
__________________

Last edited by fysiks; 08-07-2011 at 21:38.
fysiks is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 08-07-2011 , 22:06   Re: classname
Reply With Quote #7

also when putting code in here make it easier for us to read.

use the php and /php tags... put the in []

then it looks like

PHP Code:
client_print(idprint_chat"WAS UP"); 
Doc-Holiday is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-07-2011 , 23:09   Re: classname
Reply With Quote #8

To clarify, he means to post code like this:

[php]
public plugin_init()
{
register_clcmd("say", "cmdSay")
register_clcmd("say_team", "cmdSay")
}
[/php]

So it looks like this:

PHP Code:
public plugin_init()
{
    
register_clcmd("say""cmdSay")
    
register_clcmd("say_team""cmdSay")

@Doc-Holiday, you can show an example like I did above like this:

[noparse][php]client_print(id, print_chat, "WAS UP");[/php][/noparse]
__________________
fysiks is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 08-08-2011 , 00:17   Re: classname
Reply With Quote #9

Quote:
Originally Posted by fysiks View Post
To clarify, he means to post code like this:

[php]
public plugin_init()
{
register_clcmd("say", "cmdSay")
register_clcmd("say_team", "cmdSay")
}
[/php]

So it looks like this:

PHP Code:
public plugin_init()
{
    
register_clcmd("say""cmdSay")
    
register_clcmd("say_team""cmdSay")

@Doc-Holiday, you can show an example like I did above like this:

[noparse][php]client_print(id, print_chat, "WAS UP");[/php][/noparse]
Thanks... lol always wondered how you guys did that.
Doc-Holiday is offline
usaexelent
Senior Member
Join Date: Nov 2009
Location: Lithuania
Old 08-08-2011 , 02:31   Re: classname
Reply With Quote #10

So can you guys tell me what's wrong?
usaexelent is offline
Send a message via Skype™ to usaexelent
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 03:21.


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