06.07.2012, 14:57
pawn Код:
if(strcmp(cmd, "/trolchat", true) == 0 || strcmp(cmd, "/ttc", true) == 0)
{
new stri[128];
new message[128];
if(sscanf(params,"s", message)) return SendClientMessage(playerid, COLOR_WHITE, "TROLL: /ttc [MESSAGE]");
{
if(PlayerInfo[playerid][ptroll] >= 1)
{
if(strlen(message) < 1)
{
SendClientMessage(playerid, COLOR_WHITE, "TROLL: /ttc [MESSAGE]");
}
else
{
format(stri, sizeof(stri), "[TROLL OOC] %s says (Level %d): %s", sendername, PlayerInfo[playerid][ptroll], message);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][ptroll] >= 1)
{
SendClientMessage(i, COLOR_WHITE, stri);
}
}
}
}
return 1;
}