This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

VIP plugin (add glow)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 05-29-2011 , 06:20   VIP plugin (add glow)
Reply With Quote #1

Hello, I wanted you to help me guys, please! I need to add in this plugin player glow and aura, not
PHP Code:
//set_pev(id, pev_effects, pev(id, pev_effects) | EF_BRIGHTLIGHT) // light aura 
, because I can't costumize its radiuss and color, but another one with glow, if I remember correctly, than it's D_LIGHT or smth... Can you help me adding in this plugin a light aura with glow and with custom settings, so I can change its color and radiuss! And one more thing I want, it's : to see VIP in scoreboard with tag : "VIP", can you add it, please? PLEASE HELP ME!

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fun>
#include <fakemeta>
#include <zombieplague>



/*
Player should have flag Q in users.ini for vip 1
Player should have flag R in users.ini for vip 2

Each VIP 1 player will receive on each round:

500 hp
150 armour
1/2 gravity
semi-visibility
Huge light aura
Word BOMB next to name in scoreboard

--------------------------------------------

Each VIP 2 player will receive on each round:

400 hp
120 armour
70% of gravity
*/

#define VIP1_FLAG ADMIN_LEVEL_E
#define VIP2_FLAG ADMIN_LEVEL_F

enum
{
    
SCOREATTRIB_ARG_PLAYERID 1,
    
SCOREATTRIB_ARG_FLAGS
};

enum ( <<= )
{
    
SCOREATTRIB_FLAG_NONE 0,
    
SCOREATTRIB_FLAG_DEAD 1,
    
SCOREATTRIB_FLAG_BOMB,
    
SCOREATTRIB_FLAG_VIP
};

public 
plugin_init() 
{
    
register_plugin"[ZP] Addon: VIP1&2""1.0""fiendshard" );    
    
RegisterHamHam_Spawn"player""fwdPlayerSpawn");
}

public 
fwdPlayerSpawn(id)
{
    if (
is_user_alive(id) && (get_user_flags(id) & VIP1_FLAG))
        {
        
set_user_health(id650// hp
        
set_user_armor(id350// armour
        
set_user_gravity(id0.30// gravity
        
set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAlpha,127// semi-visibility
        //set_pev(id, pev_effects, pev(id, pev_effects) | EF_BRIGHTLIGHT) // light aura
        
}
    if (
is_user_alive(id) && (get_user_flags(id) & VIP2_FLAG))
        {
        
set_user_health(id500// hp
        
set_user_armor(id175// armour
        
set_user_gravity(id0.50// gravity
        
}
    return 
HAM_IGNORED
}

public 
client_putinserver(id)
{        
    if ((
get_user_flags(id) & VIP1_FLAG))
    {
        
zp_set_user_ammo_packs(id20)
    }
    if ((
get_user_flags(id) & VIP2_FLAG))
    {
        
zp_set_user_ammo_packs(id15)
    }
    return 
PLUGIN_HANDLED;
}

public 
MessageScoreAttrib(iMsgIdiDestiReceiver)
{
    new 
iPlayer get_msg_arg_int(SCOREATTRIB_ARG_PLAYERID);
    if(
access(iPlayerVIP1_FLAG)) 
    {
        
set_msg_arg_int(SCOREATTRIB_ARG_FLAGSARG_BYTESCOREATTRIB_FLAG_BOMB);
    }


Podarok is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-29-2011 , 12:13   Re: VIP plugin (add glow)
Reply With Quote #2

You want player to glow or you want it to emit light ?

For glow is simple, set_user_render() (search in func wiki for info on arguments)

For dynamic light (TE_DLIGHT) you need to send a repeatitive messsage, you should search also on how to do that.

And you can find the "VIP" on scoreboard thing aswell, just note that is visible only to CTs.
__________________
Hunter-Digital is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 05-30-2011 , 06:39   Re: VIP plugin (add glow)
Reply With Quote #3

I want players to glow and TE_DLIGHT too! Can you add it in my plugin please? And When I am a CT I don't see myself with VIP tag in scoreboard!
Podarok is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-30-2011 , 15:58   Re: VIP plugin (add glow)
Reply With Quote #4

Maybe because you're setting it to BOMB ?

Use (1<<2) for VIP and (1<<1) for BOMB, you can combine them using | aswell.

Still, they confuse people so I recommend you just remove them.

And about TE_DLIGHT, search in scripting/includes/messages_const.inc for that (TE_DLIGHT) and see it's arguments, use message_begin(MSG_BROADCAST, SVC_TEMPENTITY) as message start.

Then add a task in the player spawn function and check if player is alive in the task function and then send the message and re-set the task.
Try out various life, decay and task settings until you like it.
__________________
Hunter-Digital is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 05-31-2011 , 05:50   Re: VIP plugin (add glow)
Reply With Quote #5

Srsly I'm not a GOOD scripter, thats why I don't know how to write plugins etc... Please can you insert it into my plugin ? Please, help me!
Podarok 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 13:26.


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