Utility Natives v1.0.1

News about releases and development

Moderator: Space Headed Team

Utility Natives v1.0.1

Postby Orangutanz » Wed Dec 13, 2006 2:23 am

Powerful set of natives to utilise with your script(s). Due to the fact I use to maintain & update VexdUM, so with that experience I've created this.

v1.0.1 doesn't contain anything new, just a code revision.

List of natives: (ripped from include file)
[pawn]/* Space Headed Productions Utility Natives
*
* Copyright © 2006, Space Headed Productions
*
* This file is provided as is (no warranties).
*
*/

#if defined _shpun_included
#endinput
#endif
#define _shpun_included

#pragma library SHPUN

enum find_type {
find_classname,
find_globalname,
find_model,
find_target,
find_targetname,
find_netname,
find_message,
find_noise,
find_noise1,
find_noise2,
find_noise3,
find_viewmodel,
find_weaponmodel
}

enum hull_type {
point_hull,
human_hull,
large_hull,
head_hull
}

enum dist_type {
dist_inch,
dist_foot,
dist_yard,
dist_kilometer,
dist_mile
}

native create_entity(const name[]);
native remove_entity(index);
native find_entity(index, const name[], type=find_classname);
native drop_to_floor(index);
native force_touch(toucher, touched);
native force_use(used, user);
native get_entity_origin(index, Float:output[3]);
native set_entity_size(index, Float:mins[3], Float:maxs[3]);
native set_entity_origin(index, Float:origin[3]);
native set_entity_model(index, const model[]);
native dispatch_spawn(index);
native dispatch_keyvalue(index, const keyname[], const value[]);
native point_contents(Float:origin[3]);
native attach_view(index, target);
native set_lights(const flags[]);
native set_rendering(index, fx=kRenderFxNone, r=255, g=255, b=255, render=kRenderNormal, amount=16);
native is_visible(index, target, viewcone=0);
native is_in_world(index);
native Float:get_traveltime(Float:Speed, Float:vSource[3], Float:vPosition[3]);
native Float:get_real_distance(Float:vOrigin1[3], Float:vOrigin2[3], type=-1); // default type is a meter

native trace_hull(Float:origin[3], fNoMonsters=0, hull_type:hullNumber, SkipEntity=0);
native trace_line(index, Float:start[3], Float:end[3], Float:rtn[3]);
native trace_normal(index, Float:start[3], Float:end[3], Float:rtn[3]);
native trace_texture(index, Float:angles[3], output[], len);

native IVecFVec(iVector[3], Float:fVector[3]);
native FVecIVec(Float:fVector[3], iVector[3]);
native normalize(Float:vector[3], Float:output[3]);
native Float:dot_product(Float:vector1[3], Float:vector2[3]);

native respawn_player(id, time=1);
native get_user_model(id, output[], len);
native set_user_model(id, const model[]="");

native radius_damage(attacker, Float:damage, Float:origin[3], Float:radius, bit = DMG_GENERIC, wpnName[]="", headshot = 0);
native take_damage(victim, attacker, Float:origin[3], Float:damage, bit = DMG_GENERIC, wpnName[]="", headshot = 0);[/pawn]
A few of the mods coming out here over the coming weeks will be taking advantage of this plugin. Brad & I have already been reviewing the Timebomb punishment in ATAC3 by utilising radius_damage since it allows for a nice twist to the norm :D

Unzip into your amxmodx directory
add to plugins.ini: shpun.amxx


Away you go...
Attachments
SHPUN_v1.0.1.zip
Utility Natives v1.0.1
(41.63 KiB) Downloaded 294 times
Last edited by Orangutanz on Sat May 05, 2007 11:46 am, edited 2 times in total.
User avatar
Orangutanz
SHP Founder
SHP Founder
 
Posts: 289
Joined: Tue Apr 18, 2006 2:14 am

Postby Zenith » Wed Dec 13, 2006 3:02 am

I noticed a lot of default natives that are present in AMXX. Is there some difference between these and the default ones? However, at the same time I see a lot of useful natives, gj :).
I am, Zenith.
User avatar
Zenith
Developer
Developer
 
Posts: 47
Joined: Tue Dec 12, 2006 12:23 am

Postby Orangutanz » Wed Dec 13, 2006 3:08 am

Well you have to remember the default natives supplied by AMXX are for Engine module. This is written in FakeMeta, taking full advantage of AMXX's native registration system :)
User avatar
Orangutanz
SHP Founder
SHP Founder
 
Posts: 289
Joined: Tue Apr 18, 2006 2:14 am

Postby Zenith » Wed Dec 13, 2006 3:43 am

Thought that might be it, but I was too lazy to look :).
I am, Zenith.
User avatar
Zenith
Developer
Developer
 
Posts: 47
Joined: Tue Dec 12, 2006 12:23 am

Postby jopmako » Thu Dec 14, 2006 5:00 pm

thx,it's useful for me.
jopmako
 
Posts: 6
Joined: Sun Nov 12, 2006 2:45 pm

Re: Utility Natives v1.0

Postby Simon Logic » Tue Dec 19, 2006 5:43 pm

Orangutanz, why do you do the job which already been done by VEN with his fakemeta_util.inc ( http://forums.alliedmods.net/showthread.php?t=28284 ) ?
Simon Logic
 
Posts: 16
Joined: Tue Dec 19, 2006 5:41 pm

Postby Orangutanz » Tue Dec 19, 2006 7:54 pm

Its not been done before, if you think about it for a moment.

This is actually registering natives VEN's uses defines/stocks which isn't safe guarding scripters from various technicalities which this does. Also due to VEN's stocks this gets embedded into scripts rather than scripts calling commands. So in theory this saves memory!

Also this was produced before VEN released his definey/stocky script, just we didn't release it until now.
User avatar
Orangutanz
SHP Founder
SHP Founder
 
Posts: 289
Joined: Tue Apr 18, 2006 2:14 am

Postby Simon Logic » Wed Dec 20, 2006 1:00 am

Oh, i see. Yours is a native_fakemeta_util.inc + a module :)

Do you think it will be an extension of fakemeta in future?
Simon Logic
 
Posts: 16
Joined: Tue Dec 19, 2006 5:41 pm

Postby Zenith » Wed Dec 20, 2006 2:53 am

Not likely, since this is technically made by a 3rd party, it won't be made default to the AMXX libraries/include files like fakemeta_utils. However, I put this up for discussion with Orangutanz, but it may one day be part of a "SHP Framework" were SHPUN and other API's that plugins may depend on are delivered in one nice little package instead of the client/dev having to download each one separately.
I am, Zenith.
User avatar
Zenith
Developer
Developer
 
Posts: 47
Joined: Tue Dec 12, 2006 12:23 am

Postby Orangutanz » Wed Dec 20, 2006 3:37 am

Technically its not made by a 3rd party, since DevconeS & myself are AMXX Devs :lol:
But yeah thats a good idea Zenith for the future bundle the whole lot into one package.

FYI fakemeta_utils isn't bundled with AMXX :wink:
User avatar
Orangutanz
SHP Founder
SHP Founder
 
Posts: 289
Joined: Tue Apr 18, 2006 2:14 am

Postby Zenith » Wed Dec 20, 2006 11:03 pm

Not right now, but I think it was going to be added. Not sure, you're a dev so :p.
I am, Zenith.
User avatar
Zenith
Developer
Developer
 
Posts: 47
Joined: Tue Dec 12, 2006 12:23 am

Postby Brad » Thu Dec 21, 2006 2:52 pm

It was going to be added a couple versions back. It wasn't. Prognosis for the future isn't looking good.
Brad
Developer
Developer
 
Posts: 39
Joined: Thu Nov 23, 2006 2:57 am

Postby Orangutanz » Thu Dec 21, 2006 8:02 pm

I cannot post a comment about this.
User avatar
Orangutanz
SHP Founder
SHP Founder
 
Posts: 289
Joined: Tue Apr 18, 2006 2:14 am

Postby k007 » Thu Aug 23, 2007 12:00 am

Good API, i been looking for a take damage native since AMXx's was broken
k007
 
Posts: 2
Joined: Wed Aug 22, 2007 11:55 pm

Postby Orangutanz » Thu Aug 23, 2007 1:25 pm

k007 wrote:Good API, i been looking for a take damage native since AMXx's was broken

Ham Sandwich can do this for popular mods.

Glad you like anyhow :wink:
User avatar
Orangutanz
SHP Founder
SHP Founder
 
Posts: 289
Joined: Tue Apr 18, 2006 2:14 am


Return to Releases

Who is online

Users browsing this forum: No registered users and 0 guests

cron