24.02.2010, 12:33
Код:
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?