Raised This Month: $12 Target: $400
 3% 

Allowing a user to plant C4 Status


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fang
Senior Member
Join Date: Nov 2007
Location: New Jersey
Old 12-24-2008 , 12:37   Allowing a user to plant C4 Status
Reply With Quote #1

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
fang is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 12-24-2008 , 14:12   Re: Allowing a user to plant C4 Status
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?p=682465 ?
__________________
xPaw is offline
fang
Senior Member
Join Date: Nov 2007
Location: New Jersey
Old 12-24-2008 , 18:39   Re: Allowing a user to plant C4 Status
Reply With Quote #3

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.
fang is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 12-24-2008 , 18:56   Re: Allowing a user to plant C4 Status
Reply With Quote #4

Quote:
Originally Posted by fang View Post
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.
__________________

Community / No support through PM
danielkza is offline
fang
Senior Member
Join Date: Nov 2007
Location: New Jersey
Old 12-24-2008 , 19:52   Re: Allowing a user to plant C4 Status
Reply With Quote #5

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?

Last edited by fang; 12-24-2008 at 21:25.
fang is offline
Reply



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 13:15.


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