Raised This Month: $ Target: $400
 0% 

using engine to get classname


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 07-01-2009 , 19:58   using engine to get classname
Reply With Quote #1

PHP Code:
/* Script generated by Pawn Studio */

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <tfcx>



public plugin_init()
{
    
register_plugin("Simple Class Retriever""1.0""HLM A.K.A. Master")
}

public 
client_putinserver(id)
{
    
set_task(40.0"getclass" id )
    
set_task(42.0"getclassname" id )
}

public 
getclass(id)
{
    new 
name[33]
    
get_user_name(id,name,32)
    new class = 
entity_get_int(idEV_INT_playerclass)
    
log_amx("%s class is %i",name,class)
    
client_print(id,print_chat"%s, hold still while I determine your class..",name)
}

public 
getclassname(id)
{
    new 
name[33]
    
get_user_name(id,name,32)
    
    new 
classname[id] = EV_SZ_classname
    
    
    log_amx
("%s class is %s",name,classname)
    
client_print(id,print_chat"%s, I have determined your class to be %s",name,classname)

get classname doesnt work properly.. it doesnt return a classname..
__________________
+|- KARMA Respectively


Last edited by HLM; 07-01-2009 at 21:39.
HLM is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-01-2009 , 21:54   Re: using engine to get classname
Reply With Quote #2

PHP Code:
static szClass32 ];
entity_get_stringent EV_SZ_classname szClass 31 ); 
__________________
Bugsy is offline
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 07-01-2009 , 21:57   Re: using engine to get classname
Reply With Quote #3

ahh, okay thank you bugsy..
__________________
+|- KARMA Respectively

HLM is offline
Reply



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 15:26.


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