Raised This Month: $32 Target: $400
 8% 

Map Requests


Post New Thread Reply   
 
Thread Tools Display Modes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-11-2010 , 19:39   Re: Map Requests
Reply With Quote #91

Quote:
Originally Posted by drekes View Post
Updated to 1.7:
I would change:

PHP Code:
                if(Data[0] == ';' || (Data[0] == '/' && Data[1] == '/'))
                    continue; 
to

PHP Code:
                trim(Data)
                if(!
Data[0] || Data[0] == ';' || (Data[0] == '/' && Data[1] == '/'))
                    continue; 
To prevent mistakes if file is edited by hand (aka allowing blank lines without concequences).

I also see a potential bug. It is because of using containi(). If you are overwriting for de_dust but de_dust2 comes before it then de_dust2 will be overwritten with de_dust and there will then be two de_dust's and no de_dust2's.
__________________

Last edited by fysiks; 09-11-2010 at 19:48.
fysiks is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 09-11-2010 , 22:26   Re: Map Requests
Reply With Quote #92

Thanks fysiks, i'll look into it.

Edit: done
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.

Last edited by drekes; 09-11-2010 at 22:45.
drekes is offline
Send a message via MSN to drekes
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 09-12-2010 , 23:31   Re: Map Requests
Reply With Quote #93

Looks good

Maybe make a cvar for the max amount of requests allowed? Maybe.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 09-12-2010 , 23:44   Re: Map Requests
Reply With Quote #94

Quote:
Originally Posted by nikhilgupta345 View Post
Looks good

Maybe make a cvar for the max amount of requests allowed? Maybe.
There's a define for that:
Code:
#define MAX_REQUESTS 3
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-02-2010 , 19:28   Re: Map Requests
Reply With Quote #95

Code is ok.

Suggestions
  • Don't use colorchat nor print_chat, but print_console when player nominate a map by command and not by chat.
  • Make a cvar for max requests instead of define
  • Decrease arrays size that handle map names, max mapnames length is 32, you may add some extra cells to potential quotes since you read files and such.

I also see another problem, same player can nominate the same map again and again, i mean there is a limitation per map, but once the map has changed, player can nominate again, or after a retry.
I see no good solution for this, except create on file per map and store votes and steamids, but meh...

APPROVED
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Anonymous
Member
Join Date: Nov 2009
Location: Anonuser.org
Old 02-15-2012 , 01:36   Re: Map Requests
Reply With Quote #96

Shit crashes my server rofl.
__________________
This site is filled with shitters who call themselves experts.
Anonymous is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 02-15-2012 , 06:50   Re: Map Requests
Reply With Quote #97

Do you got any error logs or any other kind of info that could help ?
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 03-11-2012 , 01:16   Re: Map Requests
Reply With Quote #98

setting "amx_mapreq_adsdelay" only affects on mapchange, perhaps you should remove the flag from the set_task and at the end of the advert task, set the task with a float of the cvar?

newline @ LINE157: set_task(get_pcvar_float(cvar_delay),"Task_Ad vert")

modify @ LINE88: set_task(get_pcvar_float(cvar_delay), "Task_Advert");

theres other ways of doing this, and im sure there are more efficient ways, this is only a suggestion
__________________
+|- KARMA Respectively

HLM 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 21:06.


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