Raised This Month: $ Target: $400
 0% 

ptouched and kill


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Natsheh
Veteran Member
Join Date: Sep 2012
Old 02-07-2022 , 11:52   Re: ptouched and kill
Reply With Quote #2

PHP Code:
//----------------------------------------------------------------------------------------------
public pfn_touch(ptrptd
{
    if(!
is_valid_ent(ptr) || !is_user_alive(ptd))
        return
    
    static 
classname[32];
    
entity_get_string(ptrEV_SZ_classnameclassname31)
    if(
equal(classname"coronavirus")) {
            
            
// This is to make the one who touches the entity die
            
set_user_health(ptd, -1);
            
entity_set_int(ptdEV_INT_deadflagDEAD_DYING);

            static 
iOwner;
            
iOwner entity_get_edict(ptrEV_ENT_owner);

            if(
is_user_connected(iOwner))
            {
                
set_user_frags(iOwnerget_user_frags(iOwner) + 1);

                static 
pUserMsgDeathMSG 0; if(!pUserMsgDeathMSGpUserMsgDeathMSG get_user_msgid("DeathMsg");
                
message_begin(MSG_ALLpUserMsgDeathMSG_0);
                
write_byte(iOwner);
                
write_byte(ptd);
                
write_byte(0);
                
write_string("coronavirus");
                
message_end();
            }
            
            
remove_entity(ptr);
    }
    
    return 
PLUGIN_CONTINUE
}
//---------------------------------------------------------------------------------------------- 
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 02-07-2022 at 14:46.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
 



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 11:40.


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