Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Sub-Plugin: New Win Messages 1.4


Post New Thread Reply   
 
Thread Tools Display Modes
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-22-2010 , 12:22   Re: [ZP] New Win Messages 1.3
Reply With Quote #171

Quote:
Originally Posted by abdul-rehman View Post
PLZ can you give me description regardin FM_AddToFullPack bcoz i dont know when it is called and i dont know what its parameters mean...
It is called many times, 1 PreThink call equals to 1000 AddToFullPack calls

Quote:
FM_AddToFullPack(entState, e, ent, host, iHostFlags, iPlayer, pSet)

AddToFullPack
Return 1 if the entity state has been filled in for the ent and the entity will be propagated to the client,
0 otherwise state is the server maintained copy of the state info that is transmitted to the client.
A MOD could alter values copied into state to send the "host" a different look for a particular entity update, etc.
e and ent are the entity that is being added to the update, if 1 is returned.
Host is the player's edict of the player whom we are sending the update to.
Player is 1 if the ent/e is a player and 0 otherwise.
pSet is either the PAS or PVS that we previous set up.
We can use it to ask the engine to filter the entity against the PAS or PVS.
We could also use the pas/pvs that we set in SetupVisibility, if we wanted to.
Caching the value is valid in that case, but still only for the current frame.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Old 07-22-2010, 13:15
bboygrun
This message has been deleted by bboygrun.
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 07-22-2010 , 13:39   Re: [ZP] New Win Messages 1.3
Reply With Quote #172

Quote:
Originally Posted by meTaLiCroSS View Post
It is called many times, 1 PreThink call equals to 1000 AddToFullPack calls
Thnxx
__________________

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
unforcer
Senior Member
Join Date: Feb 2009
Old 07-22-2010 , 16:44   Re: [ZP] New Win Messages 1.3
Reply With Quote #173

Make it for terrorist and cterrorist please
It's very good
unforcer is offline
st6315
Member
Join Date: Apr 2010
Old 08-28-2010 , 11:01   Re: [ZP] New Win Messages 1.3
Reply With Quote #174

Well, I find a plugin, which use entity to show the weapon model. And I tried to replace the weapon model with sprite, and it works! The only problem is the sprite shows in front of player is to big, and it's not transparent. Maybe some one could modify this plugin to show the win message with sprite.

Here is the code:
Quote:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>
#include <fakemeta_util>
#include <engine>
#include <xs>

#define PLUGIN "New Plugin"
#define AUTHOR "Unknown"
#define VERSION "1.0"

enum WeaponPosition
{
Position1,
Position2,
Position3,
Position4
}

new WeaponEntities[WeaponPosition]

new WeaponModels[WeaponPosition][] =
{
"sprites/zombie_plague/human_win.spr",
"sprites/zombie_plague/zombie_win.spr",
"sprites/flame.spr",
"sprites/flame.spr"
}

new WeaponPosition:PositionsOrdered[WeaponPosition] =
{
_:Position1,
_:Position2,
_:Position3,
_:Position4
}

new bool:CantUse[33]

public plugin_precache()
{
for(new WeaponPosition:i=WeaponPosition:Position1;i<W eaponPosition;i++)
{
precache_model(WeaponModels[i])
WeaponEntities[i] = createEntity(WeaponModels[i])
}
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_AddToFullPack,"addToFullP ack",1)

RegisterHam(Ham_ObjectCaps,"player","playerUs e")
}

public playerUse(id)
{
if(~get_user_button(id) & IN_USE)
{
CantUse[id] = false
}
else if(!CantUse[id])
{
CantUse[id] = true

for(new WeaponPosition:i=WeaponPosition:0;i<WeaponPos ition;i++)
{
if(!PositionsOrdered[i]--)
{
PositionsOrdered[i] = WeaponPosition - WeaponPosition:1
}
}
}
}

createEntity(model[])
{
new ent = create_entity("info_target")

assert ent;

set_pev(ent,pev_takedamage,0.0)
set_pev(ent,pev_solid,SOLID_NOT);
set_pev(ent,pev_movetype,MOVETYPE_NONE)

fm_set_rendering(ent,.render=kRenderTransAlph a,.amount=0)

entity_set_model(ent,model)

return ent
}

public addToFullPack(es, e, ent, host, hostflags, player, pSet)
{
if(is_user_alive(host) && (host == 1))
{
for(new WeaponPosition:i=WeaponPosition:0;i<WeaponPos ition;i++)
{
if(ent == WeaponEntities[i])
{
static Float:origin[3],Float:angles[3]

getPositionData(host,origin,angles,PositionsO rdered[i])

// This is a "fix". When you don't have the entity in your "view zone" set_es do not do their job
// Connor told me about two other ways of fixing it but I haven't tested them yet
entity_set_origin(WeaponEntities[i],origin)

set_es(es,ES_Origin,origin)
set_es(es,ES_Angles,angles)
set_es(es,ES_RenderMode,kRenderNormal)
set_es(es,ES_RenderAmt,200)
}
}
}
}

stock fm_get_aim_originx(index, Float:origin[3])
{
new Float:start[3], Float:view_ofs[3];
pev(index, pev_origin, start);
pev(index, pev_view_ofs, view_ofs);
xs_vec_add(start, view_ofs, start);

new Float:dest[3];
pev(index, pev_v_angle, dest);
engfunc(EngFunc_MakeVectors, dest);
global_get(glb_v_forward, dest);
xs_vec_mul_scalar(dest, 50.0, dest);
xs_vec_add(start, dest, origin);

return 1;
}

getPositionData(id,Float:origin[3],Float:angles[3],WeaponPosition:weaponPosition)
{
pev(id,pev_origin,origin)
pev(id,pev_v_angle,angles)

static Float:viewOfs[3]
pev(id,pev_view_ofs,viewOfs);
xs_vec_add(origin,viewOfs,origin);

static Float:pathForward[3]
angle_vector(angles,ANGLEVECTOR_FORWARD,pathF orward)
xs_vec_normalize(pathForward,pathForward)

static Float:pathRight[3]
angle_vector(angles,ANGLEVECTOR_RIGHT,pathRig ht)
xs_vec_normalize(pathRight,pathRight)

static Float:pathUp[3]
angle_vector(angles,ANGLEVECTOR_UP,pathUp)
xs_vec_normalize(pathUp,pathUp)

angles[0] = angles[0] - 30.0
angles[1] = angles[1] - 180.0

switch(weaponPosition)
{
case Position1:
{
xs_vec_mul_scalar(pathForward,60.0,pathForwar d)
xs_vec_add(pathForward,origin,origin)

xs_vec_mul_scalar(pathUp,-10.0,pathUp)
xs_vec_add(pathUp,origin,origin)
}
case Position2:
{
xs_vec_mul_scalar(pathForward,80.0,pathForwar d)
xs_vec_add(pathForward,origin,origin)

xs_vec_mul_scalar(pathRight,50.0,pathRight)
xs_vec_add(pathRight,origin,origin)
}
case Position3:
{
xs_vec_mul_scalar(pathForward,120.0,pathForwa rd)
xs_vec_add(pathForward,origin,origin)

xs_vec_mul_scalar(pathUp,10.0,pathUp)
xs_vec_add(pathUp,origin,origin)
}
case Position4:
{
xs_vec_mul_scalar(pathForward,80.0,pathForwar d)
xs_vec_add(pathForward,origin,origin)

xs_vec_mul_scalar(pathRight,-50.0,pathRight)
xs_vec_add(pathRight,origin,origin)
}
}
}
st6315 is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 09-11-2010 , 14:11   Re: [ZP] New Win Messages 1.3
Reply With Quote #175

Original and Amazing!
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
unforcer
Senior Member
Join Date: Feb 2009
Old 09-14-2010 , 11:56   Re: [ZP] New Win Messages 1.3
Reply With Quote #176

Can somebody tell me whether look the same plugin, but for terrorist and cterrorist ?
unforcer is offline
Sunshine live
Veteran Member
Join Date: May 2009
Location: Berlin
Old 09-14-2010 , 12:45   Re: [ZP] New Win Messages 1.3
Reply With Quote #177

Hello, I want the plugin to my server
Unfortunately, this error is only

( 50) Load fails: Plugin file open error (plugin "zp_new_win_msg_1.3.amxx")

I hope you could help me
__________________
Sunshine live is offline
Send a message via ICQ to Sunshine live Send a message via MSN to Sunshine live Send a message via Skype™ to Sunshine live
Vechta
Veteran Member
Join Date: Jun 2010
Old 09-14-2010 , 12:48   Re: [ZP] New Win Messages 1.3
Reply With Quote #178

You did forgot to add the amxx file into plugins folder
Vechta is offline
Sunshine live
Veteran Member
Join Date: May 2009
Location: Berlin
Old 09-14-2010 , 14:31   Re: [ZP] New Win Messages 1.3
Reply With Quote #179

Ne that is not true, it's inside

__________________
Sunshine live is offline
Send a message via ICQ to Sunshine live Send a message via MSN to Sunshine live Send a message via Skype™ to Sunshine live
Vechta
Veteran Member
Join Date: Jun 2010
Old 09-14-2010 , 14:34   Re: [ZP] New Win Messages 1.3
Reply With Quote #180

maybe models?
Vechta 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 08:23.


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