15.05.2016, 17:34
PHP код:
#define DIALOG_TRAZER_TODOS 666
dcmd_TrazerFAC(playerid, params[]) {
#pragma unused params
if(Player[playerid][pAdmin] >= 5)
ShowPlayerDialog(playerid, DIALOG_TRAZER_TODOS, DIALOG_STYLE_MSGBOX, "Atenзгo!", "Deseja realmente trazer todos os jogadores?", "Sim", "Nгo");
else
SCM(playerid, COR_ERRO, "Vocк Nгo Tem Permissгo!");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
if ( dialogid == DIALOG_TRAZER_TODOS ) {
if ( response ) {
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
new String[128];
format(String, sizeof(String), "O {FF0000}%s:{FFFFD2} Trouxe Todos da Facзгo ! ", getPName(playerid));
for(new i = 0; i < MAX_PLAYERS; i ++) {
if(IsPlayerConnected(i)) {
if(Player[playerid][pFaccao] == Player[i][pFaccao]) {
SetPlayerPos(i, X+1, Y+1, Z);
SCM(i, COR_INFO, String);
}
}
}
}
return 1;
}
return 0;
}