Raised This Month: $ Target: $400
 0% 

pfn_touch + bool check = gives error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Pamaliska
Senior Member
Join Date: Apr 2006
Location: Edinburgh, UK
Old 11-07-2007 , 08:27   pfn_touch + bool check = gives error
Reply With Quote #1

Hello everybody.
Could anybody tell me how to integrate a chech for my boll (Awp_User) into this code. I did what I could but it gives me an error when compiling.
Cheers.

Quote:
Error: Undefined symbol "id" on line 385


Code:
	if( equal( Weapon_Model, "models/w_awp.mdl" ) && Awp_User[id] = false)

Last edited by Pamaliska; 11-07-2007 at 08:57.
Pamaliska is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-07-2007 , 08:29   Re: pfn_touch / bool check = gives error
Reply With Quote #2

Replace 'id' with 'ptd' ?

also add a '=' symbol :

Awp_User[ptd] == false
or
!Awp_User[ptd] (is the same)
ConnorMcLeod is offline
Pamaliska
Senior Member
Join Date: Apr 2006
Location: Edinburgh, UK
Old 11-07-2007 , 08:40   Re: pfn_touch + bool check = gives error
Reply With Quote #3

Works like it should, thank you.
Since I received your help so quickly, I urge to ask for another solution to my problem. Is there any ready-made solution that would allow me to restrict (rather than force drop) users to buy certain weapons, if users do not pass bool check for Awp_User ?
Cheers.

Last edited by Pamaliska; 11-07-2007 at 09:19.
Pamaliska is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 11-07-2007 , 09:17   Re: pfn_touch + bool check = gives error
Reply With Quote #4

Not easily.

You can block them from using it with:

Code:
set_pev(id,pev_weapons,pev(id,pev_weapons)&~(1<<CSW_AWP))
When they acquire a new weapon.

<fakemeta>
purple_pixie is offline
Pamaliska
Senior Member
Join Date: Apr 2006
Location: Edinburgh, UK
Old 11-07-2007 , 09:24   Re: pfn_touch + bool check = gives error
Reply With Quote #5

I've already blocked the usage of awp by implementing bool check; if a player does not pass bool check, he/she drops that wepon and is not able to pick it back. But I don't want them to loose money. That is why I want to block awp buy, if they do not pass my bool check.
Any ideas?
Pamaliska is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 11-07-2007 , 09:31   Re: pfn_touch + bool check = gives error
Reply With Quote #6

That makes more sense.

I would say that if they fail the check you should destroy the weapon and give them the cost.

But then that would happen if they picked one up ...

You might just have to hook all the various buy commands.
purple_pixie is offline
Pamaliska
Senior Member
Join Date: Apr 2006
Location: Edinburgh, UK
Old 11-07-2007 , 16:54   Re: pfn_touch + bool check = gives error
Reply With Quote #7

Quote:
Originally Posted by purple_pixie View Post

I would say that if they fail the check you should destroy the weapon and give them the cost.
I can not destroy weapon entity, since a player that passed bool check could accidentaly drop that wepon.
Pamaliska is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 11-07-2007 , 17:52   Re: pfn_touch + bool check = gives error
Reply With Quote #8

You can hook attachtoplayer in hamsandwich and block it.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
Pamaliska
Senior Member
Join Date: Apr 2006
Location: Edinburgh, UK
Old 11-07-2007 , 18:18   Re: pfn_touch + bool check = gives error
Reply With Quote #9

Quote:
Originally Posted by Wilson [29th ID] View Post
You can hook attachtoplayer in hamsandwich and block it.
Can not find any function description for this module.
Pamaliska is offline
Pamaliska
Senior Member
Join Date: Apr 2006
Location: Edinburgh, UK
Old 11-08-2007 , 11:03   Re: pfn_touch + bool check = gives error
Reply With Quote #10

Quote:
Originally Posted by Wilson [29th ID] View Post
You can hook attachtoplayer in hamsandwich and block it.
Correct me if I'm wrong. If I do what you suggest, awp block happens before money is being deducted?
Pamaliska 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 01:15.


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