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

Server's Map Information


Post New Thread Reply   
 
Thread Tools Display Modes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-14-2015 , 11:53   Re: Server's Map Information
Reply With Quote #11

Quote:
Originally Posted by claudiuhks View Post
you can sometimes avoid using 'copy'. Especially if the size matches.

Code:
copy( g_szMapsName[ i ], charsmax( g_szMapsName[ ] ), "NoMap" );
Might be, optional:

Code:
g_szMapsName[i] = "NoMap";
No, that is bad advice, especially for someone new to AMX Mod X scripting.
__________________
fysiks is offline
red_bull2oo6
Senior Member
Join Date: Mar 2012
Location: Braila, Romania
Old 03-14-2015 , 12:04   Re: Server's Map Information
Reply With Quote #12

All done and fixed.
Should i hook /currentmap and /nextmap commands too ?
I might add a cvar for that..
__________________

My PC Themes . .
red_bull2oo6 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-14-2015 , 13:20   Re: Server's Map Information
Reply With Quote #13

I must agree with fysiks. This way of working with arrays is fine ONLY they have the same size, which is not the case there. copy native should be used instead.
__________________

Last edited by HamletEagle; 03-14-2015 at 13:21.
HamletEagle is offline
red_bull2oo6
Senior Member
Join Date: Mar 2012
Location: Braila, Romania
Old 03-14-2015 , 13:49   Re: Server's Map Information
Reply With Quote #14

Oh god.. ) i'll edit later.. i 'missed' fysiks post. ( couldnt see it wtf ? )
__________________

My PC Themes . .
red_bull2oo6 is offline
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 03-17-2015 , 03:19   Re: Server's Map Information
Reply With Quote #15

Interesting idea, indeed. Suggestions, make that you can change link to images with cvar - cause, maybe I want to show images from my game monitor which has all the images for maps I use in my server
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 03-17-2015 , 05:57   Re: Server's Map Information
Reply With Quote #16

Quote:
Originally Posted by HamletEagle View Post
I must agree with fysiks. This way of working with arrays is fine ONLY they have the same size, which is not the case there. copy native should be used instead.
The same or less, FYI. Who says that new a[32] = "bb" doesn't work?
Still a bad advice but faster.
__________________

Last edited by claudiuhks; 03-17-2015 at 05:59.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-17-2015 , 10:25   Re: Server's Map Information
Reply With Quote #17

Quote:
Originally Posted by claudiuhks View Post
The same or less, FYI. Who says that new a[32] = "bb" doesn't work?
Still a bad advice but faster.
We didn't say that it won't work, but that this is a bad way. Why should someone use a poor way for such a tiny operation ?
__________________
HamletEagle is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 03-17-2015 , 10:47   Re: Server's Map Information
Reply With Quote #18

Quote:
Originally Posted by HamletEagle View Post
We didn't say that it won't work, but that this is a bad way. Why should someone use a poor way for such a tiny operation ?
Quote:
Originally Posted by HamletEagle View Post
I must agree with fysiks. This way of working with arrays is fine ONLY they have the same size, which is not the case there. copy native should be used instead.
You just said it's ONLY going to work on the same size which means that a[32] = b[16] is incorrect but a[3] = b[3] is the only correct way.
This is completely wrong and try to test before quoting other persons thinking that they've got mistakes in their own code.
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-17-2015 , 12:01   Re: Server's Map Information
Reply With Quote #19

I won't argue. This is my last reply about that, I said that is fine, with the meaning of that it will be a good way only in that situation. It's up to you how you interpret what I'm saying, but keep in mind that english is not my native language and I'm not good at it.
__________________

Last edited by HamletEagle; 03-17-2015 at 12:03.
HamletEagle is offline
red_bull2oo6
Senior Member
Join Date: Mar 2012
Location: Braila, Romania
Old 03-17-2015 , 17:56   Re: Server's Map Information
Reply With Quote #20

@GuskiS: Thanks, i'll think how to send the cvar value to the php script.
It'll definitely be integrated in the parsed url..if it'll work.
__________________

My PC Themes . .
red_bull2oo6 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 10:10.


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