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

Map Weapon Touch Pickup


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ynet
Member
Join Date: Aug 2017
Location: israel
Old 09-19-2020 , 08:11   Map Weapon Touch Pickup
Reply With Quote #1

kind of hard to explain what i am talking about which is why i made a video of the thing i want to hook onto

https://youtu.be/Y7sqivxOAm4

all i need is a way to hook onto the object and the player who used it, the rest i can i do my self

functions i have tried to register touch in order to block with no success

"trigger_push"
"trigger_hurt"
"trigger_teleport"
"func_wall_toggle"
"func_weapons"
"func_weapon"
Ynet is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-19-2020 , 09:16   Re: Map Weapon Touch Pickup
Reply With Quote #2

You can hook FM_Touch which will trigger on everything and print the classnames. That way you will find out pretty quick.

Code:
public plugin_init() {     register_forward(FM_Touch, "Touch") } //... public Touch(toucher, touched) {     new classname[32];     pev(touched, pev_classname, classname, charsmax(classname));     server_print("Touched %s", classname); }
__________________

Last edited by Black Rose; 09-19-2020 at 09:25.
Black Rose is offline
Ynet
Member
Join Date: Aug 2017
Location: israel
Old 09-19-2020 , 11:11   Re: Map Weapon Touch Pickup
Reply With Quote #3

Quote:
Originally Posted by Black Rose View Post
You can hook FM_Touch which will trigger on everything and print the classnames. That way you will find out pretty quick.

Code:
public plugin_init() {     register_forward(FM_Touch, "Touch") } //... public Touch(toucher, touched) {     new classname[32];     pev(touched, pev_classname, classname, charsmax(classname));     server_print("Touched %s", classname); }
that's a good idea i am checking it out now

Edit: didn't work

Last edited by Ynet; 09-19-2020 at 11:19.
Ynet is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 09-19-2020 , 11:35   Re: Map Weapon Touch Pickup
Reply With Quote #4

Code:
RegisterHam(Ham_Use, "game_player_equip", "fw_use_pequip") public fw_use_pequip(ent , caller) {   }
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 09-19-2020 at 11:35.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Ynet
Member
Join Date: Aug 2017
Location: israel
Old 09-19-2020 , 17:27   Re: Map Weapon Touch Pickup
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
Code:
RegisterHam(Ham_Use, "game_player_equip", "fw_use_pequip") public fw_use_pequip(ent , caller) {   }
so i tried what you said it hooks onto the player perfectly and thanks for that but unfortnately when i try the code below it strips the player ( something i don't want to happen )
i can make it simple by silent killing him but i would rather deal with it more professionaly and block it off completely,

any help would be much apprecieted ^^

PHP Code:
public fw_use_pequip(ent caller)
{
    
    if(
get_user_team(caller) != 2)
    return 
HAM_SUPERCEDE
 

Ynet is offline
Reply


Thread Tools
Display Modes

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 08:08.


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