02.08.2012, 20:48
Adapta isso a teu gm peguei do meu gamemode so ir ageitando que tu consegue
pawn Код:
if(strcmp(cmd,"/familia",true)==0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
new tmp[256];
strmid(tmp,cmdtext,5,strlen(cmdtext));
if(!strlen(tmp)) {
SendClientMessage(playerid,Vermelho,"/familia [texto]");
return 1;
} else {
format(string, sizeof(string), "[Chat da Familia] %s: %s", aname, tmp);
Chatfamilia(0x008000AA,string,1,playerid);
return 1;
}
}
forward Chatc(COLOR,const string[],level,playerid);
public Chatfamilia(COLOR,const string[],level,playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new aname[MAX_PLAYER_NAME];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
GetPlayerName(i, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
if(dini_Int(file, "SFAMILIA") == 1 && dini_Int(file2, "SFAMILIA") == 1){
if(dini_Int(file, "FAMILIA") == dini_Int(file2, "FAMILIA")){
SendClientMessage(i, COLOR, string);
}
}
}
}
return 1;
}