AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Anti-Doorslam / Doorblock Script (https://forums.alliedmods.net/showthread.php?t=78191)

wmchris 09-29-2008 09:08

Anti-Doorslam / Doorblock Script
 
1 Attachment(s)
Makes it impossible to Block Doors by pressing USE all the time.
On USE Spam the player will be slayed within 10 seconds.

Update: made the changes which SAMURAI16 mentioned.

exvel 09-29-2008 15:32

Re: Anti-Doorslam / Doorblock Script
 
is it possible only to block "use" command instead of slay?

SAMURAI16 09-29-2008 15:40

Re: Anti-Doorslam / Doorblock Script
 
Some tips:
1) declare 'new MaxPlayers' as global and in OnPluginStart() add MaxPlayers = GetMaxClients()
2) if(Ent != -1 && Ent > 0 && Ent > GetMaxClients())
change into if(IsValidEntity(Ent))
3) if(IsClientConnected(Client) && IsClientInGame(Client))
a check of IsPlayerAlive would be good here
4) decl String:ClassName[255];
Why are you creating this variabile so large ? [20] is enough
In a forward like OnGameFrame() you should use optimized code

Finally, i don't think those global variables need to be 'static'

@exvel : yea it's possible ;
you'll have to set client buttons &= ~IN_USE

wmchris 10-03-2008 11:32

Re: Anti-Doorslam / Doorblock Script
 
i looked for a function like setclientButtons - but i were not able to find one.Thats why i implemented it as SLAY. If you can tell me the exact code how to overwrite the key pressing i will change it immediately :)

SAMURAI16 10-03-2008 11:57

Re: Anti-Doorslam / Doorblock Script
 
See this example
http://forums.alliedmods.net/showpos...8&postcount=11

wmchris 10-03-2008 15:50

Re: Anti-Doorslam / Doorblock Script
 
1 Attachment(s)
I tired the modification but it doesnt work. I added the script in this posting. Whatever i do it seems like its doing the oppsite effect. like a doubleclick ;)

SAMURAI16 10-03-2008 16:36

Re: Anti-Doorslam / Doorblock Script
 
Well with sourcemod you can't set client buttons correctly yet. Wait for next dukehacks release. Untill then add slay part again

wmchris 10-04-2008 05:53

Re: Anti-Doorslam / Doorblock Script
 
the problem with dukehacks is, that the new version will only work with the orangebox version afaik. :/

talpa 10-08-2008 15:43

Re: Anti-Doorslam / Doorblock Script
 
is possible make a plugin can exec config.cfg at round start on client , for disable all F*** script , plz i hope some person help me :P

violentcrimes 12-09-2008 03:09

Re: Anti-Doorslam / Doorblock Script
 
Anyway to make it to where it kicks the person instead of slay them?


All times are GMT -4. The time now is 18:06.

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