L4d / Prevent Smokers from smoking last survivor
Hi,
I'm pretty sure I saw that one on a russian server a while ago but I wasn't able to find the plugin. Anyway what I would like to see is a plugin that checks if all survivors -1 are at least dead, pounced, hanging on ledge or incapped and then prevent the smoker from smoking last. Preferable make it possible to set a value for chat or hud in cfg to show a message like "You are not allowed to smoke last!" and the option to slay that smoker instantly (or disable the tongue). ******* As it is now it should support +8 Player servers with multiple smoker. ******* Slapping the player by SlapPlayer command didn't work 100% to break tongue but thanks to xZk I just alter the smoker position and that seems to break the tongue now. Code:
/******************************************************************************************** |
Re: L4d / Prevent Smokers from smoking last survivor
Apparently, the slap method does not allow the smoker to move enough to leave the survivor. So the most effective solution I think it would be to use this method if it's for l4d2:
PHP Code:
|
Re: L4d / Prevent Smokers from smoking last survivor
Only for l4d2? I wrote it for l4d1.
I looked in other scripts and everyone seems to use slapplayer to break the tongue. Like the [L4D] SmokeIT Plugin. ******** if (distance>TongueMaxStretch) { SlapPlayer(Smoker, 0, false); //PrintToChatAll("\x03BREAK"); } return Plugin_Continue; ****** In my plugin the slapplayer command actually breaks the tongue too but not reliable. On first smoke it breaks the tongue (sometimes even on second smoke), every other time it seems to do nothing but I see the text message so it *should* do something, that's what I don't understand. ****** But thanks man, because you gave me the hint to alter the entity position, I am now able to break the tongue by literally kicking the smoker vertical pos +30 in the butt. :D new Float:vPos[3]; new Float:vec[3]; GetEntPropVector(id, Prop_Data, "m_vecOrigin", vPos); vec[0] = vPos[0]+0.0; vec[1] = vPos[1]+0.0; vec[2] = vPos[2]+30.0; // now break tongue TeleportEntity(id, vec, NULL_VECTOR, NULL_VECTOR); +10 didn't work, +20 wasn't reliable, now with +30 the tongue seems to break everytime. |
Re: L4d / Prevent Smokers from smoking last survivor
then it is because SlapPlayer does not push the smoker correctly in the direction it should to break the tongue, since according to the method i understand it does so in a random direction.
you should look for some method that pushes the smoker in the direction up or with more push force. maybe some method of this plugin can help you, sorry for not being of great help but my understanding about vectors is poor :/ https://forums.alliedmods.net/showthread.php?p=2347689 |
Re: L4d / Prevent Smokers from smoking last survivor
Nono you were indeed help.
With teleportentity up +30 it is working now. Thank you! Unfortunatelly I can't test it on left4dead2. I 'm running it on my l4d1 server with no issues so far. So maybe someone with l4d2 is willing to give it a shot and test it. Newest version here: https://forums.alliedmods.net/showthread.php?t=317582 |
All times are GMT -4. The time now is 09:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.