AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Allowing a user to plant C4 Status (https://forums.alliedmods.net/showthread.php?t=82499)

fang 12-24-2008 12:37

Allowing a user to plant C4 Status
 
Is there anyway to allow a user to plant c4 without creating or extending the bombsite? I've seen this done somewhere, I just can't remember what it is :|

xPaw 12-24-2008 14:12

Re: Allowing a user to plant C4 Status
 
http://forums.alliedmods.net/showthread.php?p=682465 ?

fang 12-24-2008 18:39

Re: Allowing a user to plant C4 Status
 
Not quite what I was looking for :\ I should've been clearer. What I'm looking for is a script or piece of coding that will allow the player to plant the real c4 anywhere on the map without having to have bombsites on the map or without creating a bombsite.

danielkza 12-24-2008 18:56

Re: Allowing a user to plant C4 Status
 
Quote:

Originally Posted by fang (Post 732734)
Not quite what I was looking for :\ I should've been clearer. What I'm looking for is a script or piece of coding that will allow the player to plant the real c4 anywhere on the map without having to have bombsites on the map or without creating a bombsite.

Did you look at the code? It should do what you need at some point.

fang 12-24-2008 19:52

Re: Allowing a user to plant C4 Status
 
I took a look. I'm not sure where it is if it is in there at all. :\ I'll take a look again but if you find it please tell me D: It would be very appreciated.

EDIT:

Quote:

// Is player at the bomb target (func_bomb_target)?
// Note: there are no good way to detect if player is at the info_bomb_target
new target = -1, class[] = "func_bomb_target", bool:is_inside = false
while ((target = fm_find_ent_by_class(target, class))) {
if (!
fm_boxents_distance(index, target)) {
is_inside = true
break
}
}
if (
is_inside)

// Is map contain bomb targets?
if (fm_find_ent_by_class(-1, "func_bomb_target") || fm_find_ent_by_class(-1, "info_bomb_target"))

// How to remove bomb targets?
new target = -1, classname[] = "func_bomb_target"
while ((target = fm_find_ent_by_class(target, classname)))
fm_remove_entity(target)
classname = "info_bomb_target"
while ((target = fm_find_ent_by_class(target, classname)))
fm_remove_entity(target)

Is it possible that if there is no bombsite to still set the player as "is_inside = true" and allowing them to plant the bomb?


All times are GMT -4. The time now is 09:13.

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