pfn_touch + bool check = gives error
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:
Code:
if( equal( Weapon_Model, "models/w_awp.mdl" ) && Awp_User[id] = false) |
Re: pfn_touch / bool check = gives error
Replace 'id' with 'ptd' ?
also add a '=' symbol : Awp_User[ptd] == false or !Awp_User[ptd] (is the same) |
Re: pfn_touch + bool check = gives error
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. |
Re: pfn_touch + bool check = gives error
Not easily.
You can block them from using it with: Code:
set_pev(id,pev_weapons,pev(id,pev_weapons)&~(1<<CSW_AWP))<fakemeta> |
Re: pfn_touch + bool check = gives error
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? |
Re: pfn_touch + bool check = gives error
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. |
Re: pfn_touch + bool check = gives error
Quote:
|
Re: pfn_touch + bool check = gives error
You can hook attachtoplayer in hamsandwich and block it.
|
Re: pfn_touch + bool check = gives error
Quote:
|
Re: pfn_touch + bool check = gives error
Download the newest version of amxx...1.8...it's in includes/ham_const.inc and includes/hamsandwich.inc
|
| All times are GMT -4. The time now is 01:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.