anticamp settings
hi, not sure if its possible, but can you adjust the anticamp settings for each individual g_type?
I have managed to incorperate into my new cfg an IF ELSE scenario, but i dont know how to add another ELSE to the equation.
Below is the setting from my cfg which works as is said, but i would like to add the g_type 4 (CTF) to have anticamp switched off :-k
Any ideas you can come up with i would be really grateful.
[code:1]Anti Camp {
if ( g_gametype != 1 ) {
Time: 9;
Damage: 120;
Radius: 280;
} else {
Time: 6;
Damage: 120;
Radius: 280;
}
}[/code:1]
maybe nested if...else if...else if ?
another else ?? sounds very weird in coding-technical wise ...
Cause with that if ur asking "if this and this is like that (specified) then do this and that, and if it isnt exactly like the (specified) thing then the else comes in game, it takes the part when this isnt like that.
I would just recommend to use instead of an else just more if's
You can put many if's in there (as many as u want)
[code:1]if ( g_gametype == 1 ) {
Time: 9;
Damage: 120;
Radius: 280;
}[/code:1]
[code:1]if ( g_gametype == 8 ) {
Time: 20;
Damage: 150;
Radius: 280;
}[/code:1]
and for the last thing you could get an else (when all ifs arent like they are asked then the else is on) .... but i think the else isnt needet so it will work fine just without it i guess
there are more things to use then != in the ifs ... (i think) you can also use == and && and (iam not sure but i think also u can use smth with <and>)
No switch function avaible??
No switch function avaible??
mh ? ... what he is coding there are switches
Anti Camp {
if ( g_gametype != 1 )
{
Time: 9;
Damage: 120;
Radius: 280;
} else
{ if ( g_gametype == 5(or whats ctf) )
{
Time: 6;
Damage: 120;
Radius: 280;
} else if ( g_gametype ==1 )
{
time: xx;
damage: yyy;
radius: zzz;
}
}
}
if(ok==1) cout<<"well done :P"<<endl;
else cout <<"kraster sux";
anyway i think ive missed some "{" "}" so ill go with what base said
Anti Camp {
if ( g_gametype != 1 )
{
Time: 9;
Damage: 120;
Radius: 280;
} else
{ if ( g_gametype == 5(or whats ctf) )
{
Time: 6;
Damage: 120;
Radius: 280;
} else if ( g_gametype ==1 )
{
time: xx;
damage: yyy;
radius: zzz;
}
}
}
if(ok==1) cout<<"well done :P"<<endl;
else cout <<"kraster sux";
anyway i think ive missed some "{" "}" so ill go with what base said
huuuuuuuuuh ? every coder would slap you for a code like that imho, its exactly the same i wrote except there are elses in front of the if which iam 99% sure of that this doesnt work like this (and its much more then senseless), cause how said an else is just a thing for making less writing work, so that u dont need to write an if for each sentence.
but in msl there is an elseif ... which is nearly the same then if ... (else is smth complete different then an if)
if (v1 operator v2) { commands }
elseif (v1 operator v2) { commands }
else { commands }
and here also the strings (iam not sure if they all work but mostly should)
- == equal to
=== equal to (case-sensitive)
!= not equal to
<less> larger than
>= larger than or equal to
<= smaller than or equal to
// v2 is a multiple of v1
\\ v2 is not a multiple of v1
& bitwise comparison
was an option anyway ive said ur version is better so peace (lol)
was an option anyway ive said ur version is better so peace (lol)
dont fuck with msl coders ... nah i have checked what u mean after i wrote post, your thing should be possible to (the idea itself) but how it is there it cant work peace
thanks everyone - will give it a try and let you know later, firstly the sun is out here - i got no work or Uni today so im gunna take my dog out for a real long walk and we gunna explore some woodland...