Raised This Month: $12 Target: $400
 3% 

Sandbag and LM


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vikasvishwakarma
Member
Join Date: Mar 2013
Old 11-20-2015 , 13:15   Sandbag and LM
Reply With Quote #1

Hello! everyone i am looking for help. I want lasermine and sandbag to have a color glow which changes to let you know about its health.
for example-- if sandbag has 100% health it will glow green and if it is 50% it will change to yellow and if it about to destroy like 20% it will turn red.

and also one last thing
the person who plants the sandbag can go through it.
please help.. i have looked everywhere for the answer this is the last place hope to get some help
Attached Files
File Type: sma Get Plugin or Get Source (lasermine_023.sma - 882 views - 39.0 KB)
File Type: sma Get Plugin or Get Source (zp_extra_sandbags.sma - 886 views - 13.9 KB)

Last edited by vikasvishwakarma; 11-20-2015 at 13:20.
vikasvishwakarma is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 11-20-2015 , 19:53   Re: Sandbag and LM
Reply With Quote #2

https://www.dropbox.com/sh/56qvihlyq...tpack.sma?dl=0

Take a look at ComputeColor and see if you can figure out how to use it for your purpose.
If not, post here and I will do it for you as soon as I can.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
vikasvishwakarma
Member
Join Date: Mar 2013
Old 11-20-2015 , 21:31   Re: Sandbag and LM
Reply With Quote #3

thanks for the reply. i have looked into the computercolor i found it quite hard to understand. can you do it for me please. thanks
vikasvishwakarma is offline
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 11-21-2015 , 11:00   Re: Sandbag and LM
Reply With Quote #4

A hint:

and use set_task(1.0, "glow_hp_sb", id)

in place_palletwbags(id)

public glow_hp_sb(id)
{
//Within this scope you will see if the "entity" is equal, and get health and make the condition and assign the effect
}
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
vikasvishwakarma
Member
Join Date: Mar 2013
Old 11-22-2015 , 20:10   Re: Sandbag and LM
Reply With Quote #5

thanks for giving me the hint but the problem is i have just started learning about PAWN Language so i don't know that much. that's why i am asking if anyone can do it for me that will be a big help.

Last edited by vikasvishwakarma; 11-22-2015 at 20:15.
vikasvishwakarma is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 11-23-2015 , 15:21   Re: Sandbag and LM
Reply With Quote #6

Working on a plugin that will render any entity specified depending on its health and if it's damageable. Just wait for it.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
riseofdeath
Junior Member
Join Date: Nov 2015
Location: unknown planet :o
Old 11-25-2015 , 09:45   Re: Sandbag and LM
Reply With Quote #7

i think for the the owner of sb to move is smthing to do with it :O




public checkstuck() {
if ( get_pcvar_num(ZPSTUCK) == 1 )
{
static players[32], pnum, player
get_players(players, pnum)
static Floatrigin[3]
static Float:mins[3], hull
static Float:vec[3]
static o,i
for(i=0; i<pnum; i++){
player = players[i]
if (is_user_connected(player) && is_user_alive(player)) {
pev(player, pev_origin, origin)
hull = pev(player, pev_flags) & FL_DUCKING ? HULL_HEAD : HULL_HUMAN
if (!is_hull_vacant(origin, hull,player) && !get_user_noclip(player) && !(pev(player,pev_solid) & SOLID_NOT)) {
++stuck[player]
if(stuck[player] >= get_pcvar_num(cvar[2])) {
pev(player, pev_mins, mins)
vec[2] = origin[2]
for (o=0; o < sizeof size; ++o) {
vec[0] = origin[0] - mins[0] * size[o][0]
vec[1] = origin[1] - mins[1] * size[o][1]
vec[2] = origin[2] - mins[2] * size[o][2]
if (is_hull_vacant(vec, hull,player)) {
engfunc(EngFunc_SetOrigin, player, vec)
effects(player)
set_pev(player,pev_velocity,{0.0,0.0,0.0})
o = sizeof size
}
}
}
}
else
{
stuck[player] = 1
}
}
}

}

}


some one help both of us :O
riseofdeath is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 11-29-2015 , 15:45   Re: Sandbag and LM
Reply With Quote #8

The entities will render as soon as they take damage for the first time. Have fun.
Attached Files
File Type: sma Get Plugin or Get Source (D7_render_hp.sma - 861 views - 7.5 KB)
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
vikasvishwakarma
Member
Join Date: Mar 2013
Old 11-29-2015 , 20:51   Re: Sandbag and LM
Reply With Quote #9

thanks for your help

Last edited by vikasvishwakarma; 11-29-2015 at 20:51.
vikasvishwakarma is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 11-30-2015 , 07:52   Re: Sandbag and LM
Reply With Quote #10

Np, sorry for taking so long.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
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:03.


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