Raised This Month: $ Target: $400
 0% 

Bomb Transfer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 05-03-2011 , 20:43   Bomb Transfer
Reply With Quote #1

I found
PHP Code:
fm_transfer_user_gun(carrierrecipientCSW_C4
in the Tutorial area posted by ven. However when i use it it just drops it on the floor

any one know if this works still? or a better way maybe

http://forums.alliedmods.net/showthr...highlight=bomb

It's a bool I know just dont get how to use it stock is below

PHP Code:
stock bool:fm_transfer_user_gun(index1index2wid 0, const wname[] = "") {
    new 
ent_class[32]
    if (!
wid && wname[0])
        
copy(ent_class31wname)
    else {
        new 
weapon widclipammo
        
if (!weapon && !(weapon get_user_weapon(index1clipammo)))
            return 
false
        
        get_weaponname
(weaponent_class31)
    }

    new 
ent_weap fm_find_ent_by_owner(-1ent_classindex1)
    if (!
ent_weap)
        return 
false

    engclient_cmd
(index1"drop"ent_class)

    new 
ent_box pev(ent_weappev_owner)
    if (!
ent_box || ent_box == index1)
        return 
false

    set_pev
(ent_boxpev_flagspev(ent_boxpev_flags) | FL_ONGROUND)
    
dllfunc(DLLFunc_Touchent_boxindex2)
    if (
pev(ent_weappev_owner) != index2)
        return 
false

    
return true

EDIT!!!!!! im an idiot.......

i was blocking touch.. HAHAHAHAHAHHAHAHA DONT JUDGE ME!

Last edited by Doc-Holiday; 05-03-2011 at 22:29.
Doc-Holiday is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-04-2011 , 01:41   Re: Bomb Transfer
Reply With Quote #2

Or just call cs function GiveC4 with orpheu, it will give c4 to next available player ;)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 05-06-2011 , 00:40   Re: Bomb Transfer
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
Or just call cs function GiveC4 with orpheu, it will give c4 to next available player ;)
Just so you know why i use this. Its going to a specific player selected at round start.

I havent run across it yet but should i use Is_Player if i am selecting a player at round start since is_user_alive isnt always true at the time that the event fires?
Doc-Holiday is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-06-2011 , 02:05   Re: Bomb Transfer
Reply With Quote #4

If you use HLTV event as new round detection, then only surviving players are alive.
Players are spawned the same frame, but after this event.
Also, some players may be in Appearence Menu Selection and in that case they won't be respawned.

IsPlayer won't help on this i think because it always returning true on players.

If you can wait untill RoundStart, there you are granted that all players have been respawned.

If you really want to do this at new round, you can hook CHalfLifeMultiplay::RestartRound POST with orpheu.
If you don't want to use orpheu, you can register FM_StartFrame at HLTV event, and when it is triggered unregister it and execute your code (this method is used in invisibility armouries plugin by VEN).
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 05-06-2011 at 02:20.
ConnorMcLeod 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 04:27.


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