Raised This Month: $ Target: $400
 0% 

Scout Sniper Only


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-17-2007 , 05:08   Re: Scout Sniper Only
Reply With Quote #1

I don't know if cs_get_user_buyzone return 1 when buytime is over but you can try it.

cstrike :

if( !cs_get_user_buyzone(id) )
return

fakemeta :

if( !__cs_get_user_buyzone(id) )
return

Code:
#define OFFSET_MAPZONE      235 #define PLAYER_IN_BUYZONE   (1<<0) __cs_get_user_buyzone(id) {     if ( get_pdata_int(id, OFFSET_MAPZONE) & PLAYER_IN_BUYZONE )         return 1     return 0 }
ConnorMcLeod is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 11-17-2007 , 02:13   Re: Scout Sniper Only
Reply With Quote #2

For the line in red, do get_user_weapon, not get_user_weapons
__________________
M249-M4A1 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-17-2007 , 02:19   Re: Scout Sniper Only
Reply With Quote #3

Quote:
Originally Posted by M249-M4A1 View Post
For the line in red, do get_user_weapon, not get_user_weapons
Won't return true if players has not this weapon in his hands.




Just replace :
if(get_user_weapons(id) == CSW_AK47){

with

if( check_ak47( id ) ) {



Note that check_ak47( id ) doen't need to be public.
ConnorMcLeod is offline
Maurice
Senior Member
Join Date: Nov 2006
Location: Netherlands
Old 11-17-2007 , 02:40   Re: Scout Sniper Only
Reply With Quote #4

The idea from M249-M4A1 seems to work but i changed get_user_weapon on purpose to get_user_weapons because otherwise i still can buy another ak47 while i have already one if i'm holding a glock in my hands.

connorr's idea looks a simply and small solution wichof i really like it but i get a compile error 17: undefined symbol "check_ak47"
Do i have to add more in the script or wont the idea just not work?
__________________
Luck? Luck is only one feeling of amazement concerning a seemingly incidental circumstance which one himself must create.
Maurice is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-17-2007 , 05:27   Re: Scout Sniper Only
Reply With Quote #5

Once your buyzone icon is displayed the "cs_get_user_buyzone(id)" will return 1.
__________________
Still...lovin' . Connor noob! Hello
Alka 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:19.


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