command spaming
#1

Код:
if( !strcmp(cmdtext, "/advertise", true, 10) )
{

	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	if (advert[i] == 0)
	{
	advert[i] = 1;
	new str[256];
	new namez[MAX_PLAYER_NAME];
	GetPlayerName(playerid,namez,sizeof(namez));
	format(str, 256, "[ADVERTISMENT]: %s | Name: %s | ", cmdtext[10], namez);
	SendClientMessage(playerid, COLOR_YELLOW, "The cost of your advertisment is 150$");
	SendClientMessageToAll(COLOR_GREEN, str);
	GivePlayerMoney(playerid, -150);
	SetTimer("advoff", 60000, true);
	}
		else
	{
	SendClientMessage(playerid, COLOR_GREY, "You must wait 1 minute to post your advertise again");
 	}
	}

	return 1;
}

why this command spams the advertisment in main chat? I think something is going wrong with i [i] can someone tell me what could i do to stop it?
Reply


Messages In This Thread
command spaming - by TouR - 24.02.2010, 12:33
Re: command spaming - by TouR - 24.02.2010, 12:33
Re: command spaming - by BlackFoX - 24.02.2010, 12:34
Re: command spaming - by TouR - 24.02.2010, 12:35
Re: command spaming - by VonLeeuwen - 24.02.2010, 12:37
Re: command spaming - by TouR - 24.02.2010, 12:40
Re: command spaming - by BlackFoX - 24.02.2010, 12:41
Re: command spaming - by VonLeeuwen - 24.02.2010, 12:42
Re: command spaming - by TouR - 24.02.2010, 12:44
Re: command spaming - by BlackFoX - 24.02.2010, 12:46

Forum Jump:


Users browsing this thread: 3 Guest(s)