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;
}
if(strcmp(cmdtext, "/bw", true, 3) == 0)
{
new nick[24], string[128], nickg[24];
GetPlayerName(playerid, nick, sizeof nick);
if(strfind(nick, "_Gewalt", false) != -1)
{
format(string, sizeof string, "[Familia] %s[%d]: %s", nick, playerid, cmdtext[4]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetPlayerName(playerid, nickg, sizeof nickg);
if(strfind(nickg, "_Gewalt", false) != -1 && IsPlayerConnected(i))
{
SendClientMessage(i, -1, string);
}
}
}
return 1;
}
CMD:gewalt(playerid)
{
new nick[24], string[128], nickg[24];
GetPlayerName(playerid, nick, sizeof nick);
if(strfind(nick, "_Gewalt", false) != -1)
{
format(string, sizeof string, "[Gewalt] %s[ %d ]: %s", nick, playerid, cmdtext[4]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetPlayerName(playerid, nickg, sizeof nickg);
if(strfind(nickg, "_Gewalt", false) != -1)
{
SendClientMessage(i, -1, string);
}
}
return 1;
}
sim, so passei pra zcmd e identei e que ele no post dele ele nao pois se й strcmp ou zcmd
|
if(strcmp(cmd, "/gw", true) == 0)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
if(strfind(pName, "_Gewalt", false) != -1)
{
new length = strlen(cmdtext);
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(strlen(result) == 0) return SendClientMessage(playerid, -1, "USO: /gw [Texto]");
new str[128];
format(str, sizeof(str), "%s [Familia Gewalt]: %s", pName, result);
new i = 0;
while(i < MAX_PLAYERS)
{
new nick1[MAX_PLAYER_NAME];
GetPlayerName(i, nick1, sizeof(nick1));
if(strfind(nick1, "_Gewalt", false) != -1)
{
SendClientMessage(i, 0xFFAAFFAA, str);
}
i++;
}
}
return 1;
}