Raised This Month: $7 Target: $400
 1% 

Help / Support Lasermine Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jackalwa
Junior Member
Join Date: Aug 2018
Old 08-07-2018 , 09:29   Lasermine Plugin
Reply With Quote #1

I'm using the Lasermine Perfect 4.2 with the Zombie Plague Special 4.2 version,both of them made by Scrash..but i don't understand why i can't make the lasermine plugin to give rewards..i want it to give rewards after it is destroyed if it's possible,for zombies and for vips and then a message to appear in chat "[ZP] Jackalwa had destroyed Tony's and won X ammo packs" and for vips "[ZP] VIP Jackalwa destroyed Tony's lasermine and won X ammo packs"..
If possible,i would like a cvar or directly added in the source,so that the LM can't be used 3/5 seconds after it is destroyed and can't be planted right after it got unplanted..the 4.2 version have that MENU to add the lasermine instantly,but it's to overpowered..

Here is the source that have a code for rewards in it

Spoiler
Jackalwa is offline
Jackalwa
Junior Member
Join Date: Aug 2018
Old 08-09-2018 , 07:13   Re: Lasermine Plugin
Reply With Quote #2

UP,someone helps me?

Last edited by Jackalwa; 08-12-2018 at 04:16.
Jackalwa is offline
Jackalwa
Junior Member
Join Date: Aug 2018
Old 08-12-2018 , 04:17   Re: Lasermine Plugin
Reply With Quote #3

UP,someone?
Jackalwa is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 08-12-2018 , 13:25   Re: Lasermine Plugin
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>
#include <zombieplague>

public plugin_init()
{
    
register_plugin("[ZP43] LM Destroy Reward""1.0.0""D7")
    
    
RegisterHam(Ham_TakeDamage"func_breakable""fwHamTakeDamageBreakablePost"1);
}

public 
fwHamTakeDamageBreakablePost(iVictimiInflictoriAttackerFloat:fDamage)
{
    if (!
iVictim || !iAttacker || fDamage <= ||
    !
is_valid_ent(iVictim) ||
    
entity_get_float(iVictimEV_FL_health) > 0.0 ||
    !
is_user_connected(iAttacker) ||
    !
zp_get_user_zombie(iAttacker))
        return;
    
    static 
szTempString[32];
    
entity_get_string(iVictimEV_SZ_classnameszTempStringcharsmax(szTempString))
    
    if (!
equali(szTempString"zp_lasermine"))
        return;
    
    
zp_set_user_ammo_packs(iAttackerzp_get_user_ammo_packs(iAttacker) + 5)
    
    
get_user_name(iAttackerszTempStringcharsmax(szTempString))
    
    
colored_chat(_iAttacker"Player^3 %s^1 won^4 5^1 Ammopacks by destroying LaserMines!"szTempString)
}

colored_chat(const iTarget 0, const iSender 0, const szMessage[], any:...)
{
    if (
iTarget && !is_user_connected(iTarget))
        return;
    
    static 
szBuffer[192];
    
vformat(szBuffercharsmax(szBuffer), szMessage4)
    
    new const 
D7_CHAT_TAG[] = "^1[^4ZP^1] ";
    
    
format(szBuffercharsmax(szBuffer), "%s%s"D7_CHAT_TAGszBuffer)
    
    static 
msgSayText;
    
    if (!
msgSayText)
        
msgSayText get_user_msgid("SayText");
    
    if (
iTarget)
        
message_begin(MSG_ONEmsgSayText_iTarget)
    else
        
message_begin(MSG_ALLmsgSayText)
    
    
write_byte(iSender iSender iTarget)
    
write_string(szBuffer)
    
message_end()

__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Jackalwa
Junior Member
Join Date: Aug 2018
Old 08-13-2018 , 08:34   Re: Lasermine Plugin
Reply With Quote #5

Thanks georgik57,can you help me with the delay for the lasermine too?
Jackalwa is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 08-13-2018 , 15:44   Re: Lasermine Plugin
Reply With Quote #6

Ask the original author.
__________________
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


Thread Tools
Display Modes

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 00:37.


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