if(dialogid == 775)
{
if(response == 1)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 775, DIALOG_STYLE_INPUT, "Expulsar da Famнlia", "Digite abaixo o nъmero do membro no /infofamilia\nque vocк deseja expulsar da sua famнlia:", "Confirmar", "Cancelar");
if(!IsNumero(inputtext)) return ShowPlayerDialog(playerid, 775, DIALOG_STYLE_INPUT, "Expulsar da Famнlia", "Digite abaixo o nъmero do membro no /infofamilia\nque vocк deseja expulsar da sua famнlia:", "Confirmar", "Cancelar");
new numero = strval(inputtext);
if(numero < 1 || numero > 9) return ShowPlayerDialog(playerid, 775, DIALOG_STYLE_INPUT, "Expulsar da Famнlia", "Digite abaixo o nъmero do membro no /infofamilia\nque vocк deseja expulsar da sua famнlia:", "Confirmar", "Cancelar");
new idfam = GetIDFamilia(playerid);
switch(numero)
{
case 1: { strmid(Familia[idfam][Membro1], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func1], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 2: { strmid(Familia[idfam][Membro2], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func2], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 3: { strmid(Familia[idfam][Membro3], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func3], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 4: { strmid(Familia[idfam][Membro4], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func4], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 5: { strmid(Familia[idfam][Membro5], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func5], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 6: { strmid(Familia[idfam][Membro6], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func6], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 7: { strmid(Familia[idfam][Membro7], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func7], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 8: { strmid(Familia[idfam][Membro8], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func8], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 9: { strmid(Familia[idfam][Membro9], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func9], "Nenhuma", 0, strlen("Nenhuma"), 255); }
}
SendClientMessage(playerid, COLOR_YELLOW, "Membro escolhido expulso com sucesso!");
SalvarFamilias();
return 1;
}
}
switch(numero)
{
case 1: { strmid(Familia[idfam][Membro1], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func1], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 2: { strmid(Familia[idfam][Membro2], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func2], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 3: { strmid(Familia[idfam][Membro3], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func3], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 4: { strmid(Familia[idfam][Membro4], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func4], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 5: { strmid(Familia[idfam][Membro5], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func5], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 6: { strmid(Familia[idfam][Membro6], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func6], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 7: { strmid(Familia[idfam][Membro7], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func7], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 8: { strmid(Familia[idfam][Membro8], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func8], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 9: { strmid(Familia[idfam][Membro9], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func9], "Nenhuma", 0, strlen("Nenhuma"), 255); }
}
|
Код:
switch(numero)
{
case 1: { strmid(Familia[idfam][Membro1], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func1], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 2: { strmid(Familia[idfam][Membro2], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func2], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 3: { strmid(Familia[idfam][Membro3], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func3], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 4: { strmid(Familia[idfam][Membro4], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func4], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 5: { strmid(Familia[idfam][Membro5], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func5], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 6: { strmid(Familia[idfam][Membro6], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func6], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 7: { strmid(Familia[idfam][Membro7], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func7], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 8: { strmid(Familia[idfam][Membro8], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func8], "Nenhuma", 0, strlen("Nenhuma"), 255); }
case 9: { strmid(Familia[idfam][Membro9], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idfam][Func9], "Nenhuma", 0, strlen("Nenhuma"), 255); }
}
|
if(dialogid == 776)
{
if(response == 1)
{
new idf = GetIDFamilia(playerid);
new cor = GetCorFamilia(idf);
if(strcmp(Familia[idf][Membro1], PlayerName(playerid), true) == 0) { strmid(Familia[idf][Membro1], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idf][Func1], "Nenhuma", 0, strlen("Nenhuma"), 255); }
if(strcmp(Familia[idf][Membro2], PlayerName(playerid), true) == 0) { strmid(Familia[idf][Membro2], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idf][Func2], "Nenhuma", 0, strlen("Nenhuma"), 255); }
if(strcmp(Familia[idf][Membro3], PlayerName(playerid), true) == 0) { strmid(Familia[idf][Membro3], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idf][Func3], "Nenhuma", 0, strlen("Nenhuma"), 255); }
if(strcmp(Familia[idf][Membro4], PlayerName(playerid), true) == 0) { strmid(Familia[idf][Membro4], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idf][Func4], "Nenhuma", 0, strlen("Nenhuma"), 255); }
if(strcmp(Familia[idf][Membro5], PlayerName(playerid), true) == 0) { strmid(Familia[idf][Membro5], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idf][Func5], "Nenhuma", 0, strlen("Nenhuma"), 255); }
if(strcmp(Familia[idf][Membro6], PlayerName(playerid), true) == 0) { strmid(Familia[idf][Membro6], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idf][Func6], "Nenhuma", 0, strlen("Nenhuma"), 255); }
if(strcmp(Familia[idf][Membro7], PlayerName(playerid), true) == 0) { strmid(Familia[idf][Membro7], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idf][Func7], "Nenhuma", 0, strlen("Nenhuma"), 255); }
if(strcmp(Familia[idf][Membro8], PlayerName(playerid), true) == 0) { strmid(Familia[idf][Membro8], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idf][Func8], "Nenhuma", 0, strlen("Nenhuma"), 255); }
if(strcmp(Familia[idf][Membro9], PlayerName(playerid), true) == 0) { strmid(Familia[idf][Membro9], "Ninguйm", 0, strlen("Ninguйm"), 255); strmid(Familia[idf][Func9], "Nenhuma", 0, strlen("Nenhuma"), 255); }
SendClientMessage(playerid, cor, "Vocк saiu da famнlia com sucesso!");
SalvarFamilias();
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if((PlayerEmFamilia(i)) && (GetIDFamilia(i) == idf))
{
new barro[256];
format(barro, sizeof(barro), "Famнlia %s: %s saiu da Famнlia.", GetNomeFamilia(playerid), PlayerName(playerid));
SendClientMessage(i, cor, barro);
}
}
}
return 1;
}
else return 1;
}