CreateExplosion
#1

hi

it doesn't work!

Код:
public Nuke()
{
	for(new i=0; i < 50; i++)
	{
		if(IsPlayerConnected(i))
		{
			new Float:X,Float:Y,Float:Z;
			GetPlayerPos(i,X,Y,Z);
			CreateExplosion(X,Y,Z,7,500000000000);
			CreateExplosion(X,Y,Z,6,5000);
			CreateExplosion(X,Y,Z,3,5000);
			CreateExplosion(X,Y,Z,7,500000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,500000000000000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,500000000);
			CreateExplosion(X,Y,Z,7,50000000000);
			CreateExplosion(X,Y,Z,7,1);
			CreateExplosion(X,Y,Z,7,1);
			CreateExplosion(X,Y,Z,7,100000000000);
			CreateExplosion(X,Y,Z,7,100000000000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,100000000000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,100000000000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			CreateExplosion(X,Y,Z,7,5000);
			SetTimer("Nend",5000,0);
			SendClientMessageToAll(COLOR_RED,"The nuclear bomb has been exploded!");
			TextDrawHideForAll(nuke);
		}
	}
	return 1;
}
Reply
#2

I can't help you with it, only I geuss it's something to do with the 5000 and stuff..

By the way, the only thing that I'm telling you:

SendClientMessageToAll(COLOR_RED,"The nuclear bomb has been exploded!"); --> If 20 players are in the server, the message will be shown 20 times for everybody. It's the best to set the message before return 1, since the loop ends there..
Reply
#3

Quote:
Originally Posted by RobinOwnz
Посмотреть сообщение
SendClientMessageToAll(COLOR_RED,"The nuclear bomb has been exploded!"); --> If 20 players are in the server, the message will be shown 20 times for everybody. It's the best to set the message before return 1, since the loop ends there..
This is true! But it is before return 1.
Reply
#4

SendClientMessageToAll(COLOR_RED,"The nuclear bomb has been exploded!"); ...work?
Reply
#5

Quote:
Originally Posted by Bogdanovic
Посмотреть сообщение
SendClientMessageToAll(COLOR_RED,"The nuclear bomb has been exploded!"); ...work?
Yes, it works. The explosion are not working properly...
Reply
#6

"it doesn't work"

Try to explain what happens, at least.
Reply
#7

Quote:
Originally Posted by g_aSlice
Посмотреть сообщение
"it doesn't work"

Try to explain what happens, at least.
I think I made a mistake. I made this nuke for players with 20 killstreak, i accidental set it to 30... My bad
Reply
#8

Код:
			SendClientMessageToAll(COLOR_RED,"The nuclear bomb has been exploded!");
			TextDrawHideForAll(nuke);
		}
	}
	return 1;
= laggfest, it will send 20 messages for 50 loops = 1000 messages
place it outside the for loop
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)