Raised This Month: $ Target: $400
 0% 

Vampire bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-15-2009 , 11:00   Re: Vampire bug
Reply With Quote #1

By the way :

- You should use pcvar
- MSG_ONE -> MSG_ONE_UNRELIABLE
- LANG_PLAYER -> iKiller ( LANG_PLAYER should be used for all players, 0 as id )
Arkshine is offline
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 04-15-2009 , 11:32   Re: Vampire bug
Reply With Quote #2

Quote:
Originally Posted by arkshine View Post
By the way :

- You should use pcvar
- MSG_ONE -> MSG_ONE_UNRELIABLE
- LANG_PLAYER -> iKiller ( LANG_PLAYER should be used for all players, 0 as id )
The message works with iKiller. But I only need the message to be displayed to the killer, not to all players. Thanks for the note I changed to
PHP Code:
client_print(idprint_chat, ... 

Last edited by Debesėlis; 04-15-2009 at 11:38.
Debesėlis is offline
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 04-16-2009 , 07:11   Re: Vampire bug
Reply With Quote #3

Everythings fine, just that when an admin chooses the vampire function and kills someone, everyone in the server is given hp. How do I make it so only the admin would get hp.

PHP Code:
public death_event(id
{
    if(
get_user_flags(id) & ADMIN_ACCESS
    {
    new 
iKiller read_data(1);
    new 
iVictim read_data(2);
    
    if(
vampir_active[iKiller] && iKiller != iVictim)
    {
    
set_user_health(iKillerget_user_health(iKiller) + get_cvar_num("amx_vampir_hp"));
    
client_print(idprint_chat"%L"LANG_PLAYER"VAMPIRE"get_cvar_num("amx_vampir_hp"));
    
    
message_begin(MSG_ONEget_user_msgid("ScreenFade"), _iKiller);
    
write_short(1<<10);
    
write_short(1<<10);
    
write_short(0x0000);
    
write_byte(0);
    
write_byte(0);
    
write_byte(200);
    
write_byte(75);
    
message_end();
    }
    }

Debesėlis is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 04-16-2009 , 07:59   Re: Vampire bug
Reply With Quote #4

0x0000 ->

#define FFADE_IN
0x0000
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 04-16-2009 , 08:13   Re: Vampire bug
Reply With Quote #5

Nothing changed....

Last edited by Debesėlis; 04-16-2009 at 08:21.
Debesėlis 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 02:28.


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