10.04.2016, 00:46
(
Последний раз редактировалось StackedPizza; 22.09.2016 в 00:33.
)
_removed_
if(text[0] == '$')
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i ++) // When you're not using foreach or y_iterate
foreach(new i : Player) // when you are using foreach or y_iterate
{
// This is inside the for-loop or inside foreach
if(pInfo[i][Clan] == pInfo[playerid][Clan]) { // Change these variables to the ones you have
// The player with ID equal to the current loop index is in the same clan as the player sending the message
SendClientMessage(i, -1, text[1]);
// You don't want to send the dollar sign along with the message, thus start sending the message from the second character. Array indexes start counting from 0 and not from 1!
return 0; // Cancel sending the message to global chat
}
}
if(strcmp(tag, targetname, false, strlen(tag)) == 0)