AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   buy defuser "hack" (https://forums.alliedmods.net/showthread.php?t=58353)

commonbullet 07-24-2007 15:13

buy defuser "hack"
 
Is there a way to enable defuser kit on maps that blocks it?

That's for a request, someone wants to transform a cs map into a de. It's working except for the defuser kit:
http://forums.alliedmods.net/showpos...0&postcount=21

Alka 07-24-2007 15:17

Re: buy defuser "hack"
 
I Think
Code:

cs_set_user_defuse(id, 1)
will work! ...;)
Must create a command "/buydefuse" or something...

commonbullet 07-24-2007 15:34

Re: buy defuser "hack"
 
I was trying to enable it in buy menu, that's a last option..., thanks.

potatis_invalido 07-24-2007 23:20

Re: buy defuser "hack"
 
Make bomb zones at the start of the new map.

commonbullet 07-25-2007 10:49

Re: buy defuser "hack"
 
They're already being created in precache.

VEN 07-25-2007 12:28

Re: buy defuser "hack"
 
Code:
public plugin_precache() {         register_forward(FM_KeyValue, "fwKeyValue") } public fwKeyValue() {           static bool:x         if(!x) {                 x = true                 engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_bomb_target"))         } }
or
Code:
public plugin_precache() {         engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_bomb_target")) }
works fine.

commonbullet 07-25-2007 12:58

Re: buy defuser "hack"
 
That's very similar to what I'm doing:
Code:
[...] public fw_keyvalue(entid, kvdid) {           new keyname[16]     get_kvd(kvdid, KV_KeyName, keyname, 15)     if(!g_BombAdded) {                 g_BombAdded = true                 for(new i = 0; i < 2; i++)                      g_MapBomb[i] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_bomb_target"))                             }     [...] }

check the full script

Bomb sites are created and bomb planting/defusuing is ok, but cts still can't buy the defuser...

I've also tried to replace "hostage_entity" for "info_bomb_target" but the problem will still remain.

VEN 07-25-2007 13:32

Re: buy defuser "hack"
 
Yes i checked your code and that's why i posted KeyValue version of snippet too. Try my snippets and report if one of them is work for you.

commonbullet 07-25-2007 21:10

Re: buy defuser "hack"
 
Well, I guessed the plugin was already doing that (?).
Anyway, I've tried both snippets by adding them in my script or running as a separate plugin.
The result is the same - defuser kit is still locked in buy menu.


All times are GMT -4. The time now is 21:26.

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