Raised This Month: $ Target: $400
 0% 

vexd_pfntouch & Weapons on ground...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 05-26-2004 , 05:00   vexd_pfntouch & Weapons on ground...
Reply With Quote #1

Does vexd_pfntouch get if a player is touching a weapon on the ground?

I'm going to be making a plugin that isn't a full csdm, but just allows multiple weapons to be picked up, etc.

Would someone show me an example of how to display perhaps on hud, if a weapon on the ground was touched?
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
BAILOPAN
Join Date: Jan 2004
Old 05-26-2004 , 05:12  
Reply With Quote #2

yes, pfn_touch() will do this:

Code:
public pfn_touch(ptr, ptd) {    if ((ptr>=1 && ptr<=32) && is_user_connected(ptr)) {       /* Do stuff here, ptr is weapon handle */    }    return PLUGIN_CONTINUE }
__________________
egg
BAILOPAN is offline
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 05-26-2004 , 06:10  
Reply With Quote #3

Thanks bailo. I will probably be using a lot of the CSDM code to look at, but not directly copy and pasting any of it. I noticed the pfn touch but once you start getting into PAGES of code, unless your the original author, it takes a while to get everything down-pat.

Haven't seen you online AIM lately. Got a new SN: TKWiredcom

Thanks for the info. Now I gotta install amxx 0.16 again on my rented/test server ;)
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 05-26-2004 , 21:28  
Reply With Quote #4

BAILOPAN has hidden himself from IRC and AIM, no way to contact him cept on the forums as far as i know.
__________________
QwertyAccess is offline
Girthesniper
Senior Member
Join Date: Mar 2004
Location: Maryland
Old 05-26-2004 , 21:29  
Reply With Quote #5

yea, balio has hidden him self in his shell
__________________
BANNED
Girthesniper is offline
Send a message via AIM to Girthesniper Send a message via MSN to Girthesniper
BAILOPAN
Join Date: Jan 2004
Old 05-26-2004 , 22:22  
Reply With Quote #6

Feel free to use all the code from CSDM as you want (it's GPL'd)

I'm on IRC often ;] but I am busy nowadays
__________________
egg
BAILOPAN is offline
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 05-26-2004 , 22:24  
Reply With Quote #7

like your sig says Legimate Bussiness! , I miss being able to talk to you on AIM though i cant bother you anymore!
__________________
QwertyAccess is offline
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 05-27-2004 , 00:56  
Reply With Quote #8

is vexd_pfntouch ran when you touch another entity?...

How do dis work?...lol

Sorry, I haven't messed with amx for a while.
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
BAILOPAN
Join Date: Jan 2004
Old 05-27-2004 , 00:58  
Reply With Quote #9

pfn_touch(ptd, ptr) is run whenever an entity touches another entity. When a player touches something, their id will be the second argument, the entity handle being the first
__________________
egg
BAILOPAN is offline
ThantiK
Senior Member
Join Date: Mar 2004
Location: Orlando, FL
Old 05-27-2004 , 01:06  
Reply With Quote #10

Ok, I got it workin...what format is ptr and ptd in, and how can I tell which weapon a player touched?

Location: back of turtle =)...love it.
__________________
AMXX -- You want control? You got it.
tkwired.com cs 1.6 -- tkwired.com:27016
ThantiK is offline
Send a message via AIM to ThantiK Send a message via MSN to ThantiK
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 10:58.


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