Author |
Topic: rain |
webber17 |
|
General Member Since: Jul 28, 2006 Posts: 223 Last: Aug 31, 2007 [view latest posts] |
|
|
|
Trigonous |
General Member Since: Mar 8, 2006 Posts: 80 Last: Oct 3, 2006 [view latest posts] |
|
|
|
webber17 |
|
General Member Since: Jul 28, 2006 Posts: 223 Last: Aug 31, 2007 [view latest posts] |
|
|
|
webber17 |
|
General Member Since: Jul 28, 2006 Posts: 223 Last: Aug 31, 2007 [view latest posts] |
|
|
|
webber17 |
|
General Member Since: Jul 28, 2006 Posts: 223 Last: Aug 31, 2007 [view latest posts] |
|
|
|
|
Category: CoD2 Scripting Posted: Saturday, Sep. 30, 2006 01:05 am |
|
There is some code missing after the " for " loop, as you can see the code goes from normal to italic.
Code: //Script by rasta, please credit if used
main()
{
level thread level.rain();
}
level.rain()
{
zufall = RandomInt(100);
while(1) {
players = getentarray("player", "classname");
if(players.size > 0) {
max_nodes = 20;
max_nodes_per_player = max_nodes/players.size;
for(ii=0;ii<max_nodes_per_player;ii++) {
for(i = 0; i < players.size; i++) {
player = players[i];
if(isAlive(player)) {
x= 350-randomfloat(700);
y= 350-randomfloat(700);
pos = player.origin +(x,y,200) ;
trace = bulletTrace(pos,pos +(0,0,-250), true, undefined);
if(trace["fraction"] != 1) playfx(level.rain,trace["position"]);
wait 0.05;
}
}
}
}
wait 0.05;
}
}
Try this. Hopefully it will work now
edited on Sep. 29, 2006 09:07 pm by codmp |
|
|
|
webber17 |
|
General Member Since: Jul 28, 2006 Posts: 223 Last: Aug 31, 2007 [view latest posts] |
|
|
|
leonpadi |
General Member Since: May 8, 2006 Posts: 16 Last: Mar 14, 2008 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Friday, Nov. 17, 2006 01:07 pm |
|
webber17 writes...Quote: nope
You must be sure that you use the correct script code.
There is a mistake in script code.
Try to copy paste this code, and this should work ;)
Code:
//Script by rasta, please credit if used
main()
{
level thread rasta_cod2_rain();
}
rasta_cod2_rain()
{
zufall = RandomInt(100);
while(1) {
players = getentarray("player", "classname");
if(players.size > 0) {
max_nodes = 20;
max_nodes_per_player = max_nodes/players.size;
for(ii=0;ii<max_nodes_per_player;ii++) {
for(i = 0; i < players.size; i++) {
player = players[i];
if(isAlive(player)) {
x= 350-randomfloat(700);
y= 350-randomfloat(700);
pos = player.origin +(x,y,200) ;
trace = bulletTrace(pos,pos +(0,0,-250), true, undefined);
if(trace["fraction"] != 1) playfx(level.rasta_cod2_rain,trace["position"]);
wait 0.05;
}
}
}
}
wait 0.05;
}
}
...this is taken from Here! |
|
|
|
sharkeh |
General Member Since: Sep 24, 2006 Posts: 20 Last: Dec 1, 2006 [view latest posts] |
|
|
|
WHC_Grassy |
General Member Since: Apr 20, 2005 Posts: 1426 Last: Aug 25, 2007 [view latest posts] |
|
|
Category: CoD2 Scripting Posted: Saturday, Nov. 18, 2006 06:07 am |
|
Standard response number #101
WHC_Grassy writes...Quote: You have to be very careful when posting code into forums, most forums have control codes for things like italic text, bold text, etc etc
One of the control codes that causes 110% of the problems with code is the italics code [ i ], note the spaces either side of the i make it undetectable.
If I do it again without spaces I will change my text to italic letters like this , and the [ i ] control code is not visible, get it?
Also the character < is a redirect code in a lot of forums, as well as a character assiciated with HTML code.
Look what happens with this line,
"This is a test using < in the sentence"
Notice the sentence is complete?
If I do it again without spaces either side of the < character look what happens.
"This is a test using <in the sentence "
Now everything after and including the < character has now gone.
This one is the main cause of scripts being destroyed by people
pasting code incorrectly.
If I do it again inside a code quote box it will remain as intended,
Code: "This is a test using<in the sentence"
So.... Always use the code option to quote script code in forums.
Hope this explains clearly what's happening.
Regards Grassy
|
|
|
|