Raised This Month: $12 Target: $400
 3% 

Automatic Unstucking


Post New Thread Reply   
 
Thread Tools Display Modes
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 02-23-2007 , 13:36   Re: Automatic Unstucking
Reply With Quote #21

...use get_players

also don't use sizeof (especially if it's in the plugin and you can count), and if you were to use it, you would get it outside of the while loop.

also I don't see the point of amx_autounstuckwait. If you were to add another cvar, it should be one for how often the looped function happens.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 02-23-2007 , 14:30   Re: Automatic Unstucking
Reply With Quote #22

Quote:
Originally Posted by Emp` View Post
also I don't see the point of amx_autounstuckwait. If you were to add another cvar, it should be one for how often the looped function happens.
somtimes this just unstucks when you are very close to a wall ( not stuck ), higher values prevent this, but takes more time.
__________________
Um, hi.

Last edited by Ramono; 02-23-2007 at 14:39.
Ramono is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 02-23-2007 , 16:15   Re: Automatic Unstucking
Reply With Quote #23

Quote:
Originally Posted by Emp` View Post
...use get_players

also don't use sizeof (especially if it's in the plugin and you can count), and if you were to use it, you would get it outside of the while loop.

also I don't see the point of amx_autounstuckwait. If you were to add another cvar, it should be one for how often the looped function happens.
What? Why not use sizeof? There's no reason not to, it's just a little extra typing.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 02-23-2007 , 19:53   Re: Automatic Unstucking
Reply With Quote #24

Quote:
Originally Posted by Hawk552 View Post
What? Why not use sizeof? There's no reason not to, it's just a little extra typing.
ya, nvm, I thought it was unnecessary. go ahead and use sizeof
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 02-24-2007 , 09:36   Re: Automatic Unstucking
Reply With Quote #25

Not needed anymore... its fine as it is now
__________________
Um, hi.
Ramono is offline
`666
AlliedModders Donor
Join Date: Jan 2006
Old 02-26-2007 , 08:20   Re: Automatic Unstucking
Reply With Quote #26

what about if player afk, dose he get teleported ?
`666 is offline
Skissors
Senior Member
Join Date: Jan 2007
Location: Due East of my backyard
Old 02-26-2007 , 08:32   Re: Automatic Unstucking
Reply With Quote #27

Quote:
Originally Posted by `666 View Post
what about if player afk, dose he get teleported ?
only if hes stuck
why owuld an afk be telelported?
__________________
-Karma if you read this post
current karma i lost track but its less than -70
please leave your name, I wont be offended.

IM BACK
Skissors is offline
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 03-10-2007 , 17:57   Re: Automatic Unstucking
Reply With Quote #28

Quote:
Originally Posted by Emp` View Post
...use get_players
Changing back to maxplayers cause of this:

for example there are 3 players in the server.
player 1: with ID1
player 2: with ID2
player 3: with ID3
unstucking works normal,

player 2 leaves, player 3 keeps ID3

the loop wont go further than ID1 because ID2 aint a valid player.
__________________
Um, hi.

Last edited by Ramono; 03-11-2007 at 08:20.
Ramono is offline
watch
Senior Member
Join Date: Sep 2005
Old 03-11-2007 , 05:02   Re: Automatic Unstucking
Reply With Quote #29

Noticed this the other day but was too lazy to post.

You used get_playersnum() not get_players before ;D
__________________
Code:
#include <amusing_small_signiture>
watch is offline
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 03-11-2007 , 08:21   Re: Automatic Unstucking
Reply With Quote #30

I never used get_players before, can you give me an example how to do it?
__________________
Um, hi.
Ramono is offline
Reply


Thread Tools
Display Modes

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 03:36.


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