Raised This Month: $ Target: $400
 0% 

how to check if player is camping


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Apokalipsisa
Member
Join Date: May 2012
Old 09-02-2012 , 10:37   how to check if player is camping
Reply With Quote #1

Pls,give me an example code-i want to check if player is camping.He can move his weapon but he e is stayng on one place.Pls give me an example,thank you.
Apokalipsisa is offline
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 09-02-2012 , 10:47   Re: how to check if player is camping
Reply With Quote #2

Not possible
__________________
simanovich is offline
Apokalipsisa
Member
Join Date: May 2012
Old 09-02-2012 , 10:51   Re: how to check if player is camping
Reply With Quote #3

Quote:
Originally Posted by simanovich View Post
Not possible
WTF,i well how anti camping plugins work ? :O
I have found only 1 thath is close for what i need but its 64 kb and the code is very long.
Some one pls give me example how to check if player camp.
Apokalipsisa is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 09-02-2012 , 11:00   Re: how to check if player is camping
Reply With Quote #4

There are plugins that already do this, go look at how they do it.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Apokalipsisa
Member
Join Date: May 2012
Old 09-02-2012 , 11:41   Re: how to check if player is camping
Reply With Quote #5

Quote:
Originally Posted by YamiKaitou View Post
There are plugins that already do this, go look at how they do it.
Well man i find only 2-3.The one thats is close to what i need is 64 kb and the code is very veri long,i get confused.Pls some one who is good with scripting post a easy code how to check the player is camping.
Apokalipsisa is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-02-2012 , 11:51   Re: how to check if player is camping
Reply With Quote #6

It's actually extremely simple. You check if their position has changed over time. So, if their position has not change (much) after how ever many seconds you want to define, then you can assume that they are camping.

Note the emphasis on "assume"
__________________
fysiks is offline
Apokalipsisa
Member
Join Date: May 2012
Old 09-02-2012 , 12:00   Re: how to check if player is camping
Reply With Quote #7

Quote:
Originally Posted by fysiks View Post
It's actually extremely simple. You check if their position has changed over time. So, if their position has not change (much) after how ever many seconds you want to define, then you can assume that they are camping.

Note the emphasis on "assume"
ok man but can you give me an example code?I am not very good with screepting.
Apokalipsisa is offline
daniel46
Senior Member
Join Date: Dec 2011
Old 09-02-2012 , 15:59   Re: how to check if player is camping
Reply With Quote #8

im not sure but you do get uset origin and after few seconds you check if that origin is same or + a little bit
daniel46 is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 09-02-2012 , 20:34   Re: how to check if player is camping
Reply With Quote #9

Quote:
Originally Posted by simanovich View Post
Not possible
You're an idiot.
Quote:
Originally Posted by daniel46 View Post
im not sure but you do get uset origin and after few seconds you check if that origin is same or + a little bit
This is how you do it.

If you want someone to write it FOR YOU. Go to request section. Its not hard. use set_task get_user_origin, and compare it with a cached origin of the previous origin.
If that isn't simple enough for you. go to request.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz 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 08:12.


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