View unanswered posts | View active topics It is currently Sat Sep 04, 2010 7:37 pm



Post new topic Reply to topic  [ 2 posts ] 
 Ent Info 
Author Message
Aristocrat
User avatar

Joined: Tue Jul 31, 2007 12:24 am
Posts: 286
Location: New York
Post Ent Info
A friend needed it... Its probably worthless but why not?

Code:
#include <amxmodx>
#include <engine>

public plugin_init() {
   register_plugin("Ent Info","Alpha","Cypher 'Brandon' Marx")
   register_clcmd("say /info","cmdEnt")
}
public cmdEnt(id) {
   new ent, body
   get_user_aiming(id, ent, body, 50)
   if(is_valid_ent(ent))
   {
      new classname[32], target[32]
      entity_get_string(ent,EV_SZ_classname,classname,31)
      entity_get_string(ent,EV_SZ_targetname,target,31)
      client_print(id,print_chat,"ID: %i", ent)
      client_print(id,print_chat,"Target: %s", target)
      client_print(id,print_chat,"Class: %s", classname)
      return PLUGIN_CONTINUE
   }
   return PLUGIN_CONTINUE
}


Thu Mar 12, 2009 1:53 am
Profile
Moderator
User avatar

Joined: Fri Dec 22, 2006 3:45 am
Posts: 957
Location: Canada
Post 
Code:
public checkenitynumber(id)
{
   new entid, entbody
   get_user_aiming(id,entid,entbody,9999)
   if(entid == 0) return PLUGIN_HANDLED

   new classname[32], target[32], targetname[32], Float:HP, Float:angles[3], Float:angles2[3]
   entity_get_string(entid,EV_SZ_classname,classname,31)
   entity_get_string(entid,EV_SZ_target,target,31)
   entity_get_string(entid,EV_SZ_targetname,targetname,31)
   entity_get_vector(entid,EV_VEC_angles,angles)
   entity_get_vector(id,EV_VEC_angles,angles2)
   HP = entity_get_float(entid,EV_FL_max_health)
   

   new entitydata[256]
   entid -= get_maxplayers()
   new len= format(entitydata,sizeof(entitydata),"Classname: %s^n",classname)
   len += format(entitydata[len],sizeof(entitydata)-len,"Target: %s^n",target)
   len += format(entitydata[len],sizeof(entitydata)-len,"Targetname: %s^n",targetname)
   len += format(entitydata[len],sizeof(entitydata)-len,"Health: %f^n",HP)
   len += format(entitydata[len],sizeof(entitydata)-len,"EntID: %i^n",entid)
   len += format(entitydata[len],sizeof(entitydata)-len,"Angles: %f %f %f^n",angles[0],angles[1],angles[2])
   len += format(entitydata[len],sizeof(entitydata)-len,"^nYour current Angles: %f %f %f^n",angles2[0],angles2[1],angles2[2])
   client_print(id,print_console,entitydata)
   return PLUGIN_HANDLED
}


From HarbuRPAlpha.sma :roll:

_________________
Image

TSRP Setup Support (ARP + HWRP Supported)


Thu Mar 12, 2009 3:15 pm
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.