24.08.2012, 22:39
PHP код:
#include <a_samp>
#include <ZCMD>
#if defined FILTERSCRIPT
#endif
enum fInfo{
SFCS,
SFCMS
}
new PlayerInfo[MAX_PLAYERS][fInfo];
stock SendFactionMessage(color, const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][SFCS] == 1)
{
SendClientMessage(i, color, string);
}
}
}
return 1;
}
CDM:f(playerid,params[])
{
if(PlayerInfo[playerid][SFCS] == 1 || PlayerInfo[playerid][SFCMS] == 1)
{
if(!strlen(params)) return SendClientMessage(playerid,COLOR_ERROR,"Usage: /f [Message]");
new string[128];
format(string,sizeof(string), "[Faction Chat] %s(%d): %s",pname(playerid), playerid, params);
SendFactionMessage(-1, string);
return 1;
}
else
SendClientMessage(playerid,-1,"ERROR: You are not in a faction!");
}
PHP код:
C:\Users\TaLhA XIV\Desktop\Pawno scripter\filterscripts\factionchat.pwn(43) : warning 203: symbol is never used: "f"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.