Comando Trazer Todos -
DaRoma - 09.11.2016
Serб que alguem pode me ajudar a transformar esse cmd em Dialog ?
PHP код:
CMD:trazertodos(playerid)
{
if(Player[playerid][TempoPreso] >= 1 || Player[playerid][InHospital] == true) return SCM(playerid, COR_ERRO, "[ERRO]: Vocк nгo pode fazer isso agora!");
if(NaBoateVip[playerid] == 1) return SCM(playerid, COR_ERRO, "[ERRO]: Vocк nгo pode fazer isto agora.");
if(Player[playerid][Cargo] >= 4 || Player[playerid][Admin])
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i = 0; i < HighestID; i++)
{
if(Player[i][Faccoes] == Player[playerid][Faccoes])
{
if(Player[i][TempoPreso] >= 1 || EmTrabalho[i] >= 1 || Player[i][InHospital] == true) return SCM(playerid, COR_ERRO, "[ERRO]: Alguns Players Nгo Vieram Por Algum Motivo!");
SetPlayerVirtualWorld(i, GetPlayerVirtualWorld(playerid));
SetPlayerInterior(i, GetPlayerInterior(playerid));
SetPlayerPos(i, x, y, z);
new favela[80], string[126];
if(Player[playerid][Faccoes] == 12) { favela = "Aзo"; }
if(Player[playerid][Faccoes] == 11) { favela = "Carobinha"; }
if(Player[playerid][Faccoes] == 10) { favela = "Caixa d'gua"; }
if(Player[playerid][Faccoes] == 9) { favela = "Camara"; }
if(Player[playerid][Faccoes] == 8) { favela = "Serrinha"; }
if(Player[playerid][Faccoes] == 7) { favela = "Morro do Dende"; }
if(Player[playerid][Faccoes] == 6) { favela = "Sao Carlos"; }
if(Player[playerid][Faccoes] == 5) { favela = "Quitanda"; }
if(Player[playerid][Faccoes] == 4) { favela = "Pedreira"; }
if(Player[playerid][Faccoes] == 3) { favela = "Barao"; }
if(Player[playerid][Faccoes] == 2) { favela = "Chapadгo"; }
if(Player[playerid][Faccoes] == 1) { favela = "Final Feliz"; }
format(string, sizeof(string), " O %s %s puxou todos da Comunidade %s atй ele.", AccountName(playerid), Nome(playerid), favela);
MensagemLocal(playerid, COR_ROXO, string, 20);
}
}
}
else SCM(playerid, COR_ERRO, "[ERRO]: Vocк nгo tem permissгo para usar este comando!");
return 1;
}
Re: Comando Trazer Todos -
Relaxed - 09.11.2016
Como assim? Vocк quйr que apareзa uma dialog para o player, quando o Admin dйr /trazertodos?
Re: Comando Trazer Todos -
DaRoma - 09.11.2016
Siim quando o Admin ou Algum Frente da Favela .'
Re: Comando Trazer Todos -
DaRoma - 10.11.2016
Algueem AJudaa aew.
Re: Comando Trazer Todos - Whoo - 10.11.2016
PHP код:
#define DIALOG_MOVE_FAC 232
new ownerID[MAX_PLAYERS];
CMD:trazertodos(playerid)
{
if(Player[playerid][TempoPreso] >= 1 || Player[playerid][InHospital] == true) return SCM(playerid, COR_ERRO, "[ERRO]: Vocк nгo pode fazer isso agora!");
if(NaBoateVip[playerid] == 1) return SCM(playerid, COR_ERRO, "[ERRO]: Vocк nгo pode fazer isto agora.");
if(Player[playerid][Cargo] >= 4 || Player[playerid][Admin])
{
for(new i; i < HighestID; i++)
{
if(IsPlayerConnected(i) && Player[i][Faccoes] == Player[playerid][Faccoes])
{
if(Player[i][TempoPreso] >= 1 || EmTrabalho[i] >= 1 || Player[i][InHospital] == true) continue;
new favela[80], string[126];
if(Player[playerid][Faccoes] == 12) { favela = "Aзo"; }
if(Player[playerid][Faccoes] == 11) { favela = "Carobinha"; }
if(Player[playerid][Faccoes] == 10) { favela = "Caixa d'gua"; }
if(Player[playerid][Faccoes] == 9) { favela = "Camara"; }
if(Player[playerid][Faccoes] == 8) { favela = "Serrinha"; }
if(Player[playerid][Faccoes] == 7) { favela = "Morro do Dende"; }
if(Player[playerid][Faccoes] == 6) { favela = "Sao Carlos"; }
if(Player[playerid][Faccoes] == 5) { favela = "Quitanda"; }
if(Player[playerid][Faccoes] == 4) { favela = "Pedreira"; }
if(Player[playerid][Faccoes] == 3) { favela = "Barao"; }
if(Player[playerid][Faccoes] == 2) { favela = "Chapadгo"; }
if(Player[playerid][Faccoes] == 1) { favela = "Final Feliz"; }
ownerID[i] = playerid;
format(string, sizeof(string), " O %s %s quer puxar todos da comunidade %s atй ele\n Vocк quer ir atй ele ?.", AccountName(playerid), Nome(playerid), favela);
ShowPlayerDialog(i, DIALOG_MOVE_FAC, DIALOG_STYLE_MSGBOX, "Teleportando", string, "Aceitar", "Cancelar");
}
}
}
else SCM(playerid, COR_ERRO, "[ERRO]: Vocк nгo tem permissгo para usar este comando!");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_MOVE_FAC)
{
if(response)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(ownerID[playerid], x, y, z);
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(ownerID[playerid]));
SetPlayerInterior(playerid, GetPlayerInterior(ownerID[playerid]));
SetPlayerPos(playerid, x, y, z);
}
else return 0;
}
return 0;
}