AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how to check if player is camping (https://forums.alliedmods.net/showthread.php?t=194988)

Apokalipsisa 09-02-2012 10:37

how to check if player is camping
 
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.

simanovich 09-02-2012 10:47

Re: how to check if player is camping
 
Not possible

Apokalipsisa 09-02-2012 10:51

Re: how to check if player is camping
 
Quote:

Originally Posted by simanovich (Post 1789598)
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.

YamiKaitou 09-02-2012 11:00

Re: how to check if player is camping
 
There are plugins that already do this, go look at how they do it.

Apokalipsisa 09-02-2012 11:41

Re: how to check if player is camping
 
Quote:

Originally Posted by YamiKaitou (Post 1789606)
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.

fysiks 09-02-2012 11:51

Re: how to check if player is camping
 
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" :)

Apokalipsisa 09-02-2012 12:00

Re: how to check if player is camping
 
Quote:

Originally Posted by fysiks (Post 1789649)
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.

daniel46 09-02-2012 15:59

Re: how to check if player is camping
 
im not sure but you do get uset origin and after few seconds you check if that origin is same or + a little bit

Liverwiz 09-02-2012 20:34

Re: how to check if player is camping
 
Quote:

Originally Posted by simanovich (Post 1789598)
Not possible

You're an idiot.
Quote:

Originally Posted by daniel46 (Post 1789860)
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.


All times are GMT -4. The time now is 08:12.

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