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

Dynamic cvar by number of players


Post New Thread Reply   
 
Thread Tools Display Modes
jim_yang
Veteran Member
Join Date: Aug 2006
Old 11-22-2006 , 02:02   Re: Dynamic cvar by number of players
Reply With Quote #21

you're welcome.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
RaD-PimP
Member
Join Date: May 2005
Location: Stamford, CT
Old 11-22-2006 , 12:22   Re: Dynamic cvar by number of players
Reply With Quote #22

Changing the sv_maxupdaterate above 101 is stupid. No one even uses more then 101.
RaD-PimP is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 11-23-2006 , 14:18   Re: Dynamic cvar by number of players
Reply With Quote #23

thanx guys
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 11-23-2006 , 15:55   Re: Dynamic cvar by number of players
Reply With Quote #24

going back to the switch statment, you can use
Code:
switch( int ) {     case 0,1,2,3,4: //code     case 0..4: //code (these are the same) }

You can use it with strings (somewhat). You can only use it with characters not full strings. Lesson in PAWN, strings are merely arrays of integers but hold the value of a string character and it ends with a termination character ( "^0")

example

Code:
new myString[6] format(myString , 5 , "hello") //will hold an array like so // [0] : h // [1] : e // [2] : l // [3] : l // [4] : o // [5] : ^0
So if you want to use a switch with a string you do it like so
Code:
switch( myString[1] ) {     case 'h': //code     case 'e': //code (this would be called with my example)     case 'l','o': //code     case '^0': //code     case 0: //would work the same as above     default: //code }

So, in knowing this. If you have a string and you know it can only be a couple things you can use a switch on the first character ([0]) given that the first character is unique in the different ones that would be used.

Last edited by Xanimos; 11-26-2006 at 19:12.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 11-23-2006 , 21:29   Re: Dynamic cvar by number of players
Reply With Quote #25

It's not "case default", just "default".
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 11-26-2006 , 19:12   Re: Dynamic cvar by number of players
Reply With Quote #26

lmao. HAHA. I was stoned when I wrote that. Fixing.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
EAgleAzul
Member
Join Date: Jun 2007
Old 08-08-2007 , 23:32   Re: Dynamic cvar by number of players
Reply With Quote #27

They can do this please :

1 admin amx_reservation 9
2 admin amx_reservation 8
3 admin amx_reservation 8
4 admin amx_reservation 7
5 admin amx_reservation 6
6 admin amx_reservation 5
7 admin amx_reservation 4
8 admin amx_reservation 4
9 admin amx_reservation 3

it is possible this code ?
EAgleAzul is offline
Send a message via MSN to EAgleAzul
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 02:24.


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