[Ajuda] Ajuda aqui pf
#1

Sу quero que apareзa quando um moderador kicka, aparecer que o moderador kikcou. E quando o admin kicka aparecer que o admin kickou.

Код:
if(strcmp(cmd, "/kick", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(pAdmin[playerid] == 1 || pAdmin[playerid] == 2 || pAdmin[playerid] == 3 || pAdmin[playerid] == 4 || pAdmin[playerid] == 5 ){
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "Uso: /kick [id] [motivo]");
return 1;
}
plid = strval(tmp);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
if(IsPlayerConnected(plid)){
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' ')) {
idx++;
}
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))
{
SendClientMessage(playerid, Vermelho, "Uso: /kick [id] [motivo]");
}else{
if(pAdmin[playerid]== 1){
format(string, sizeof(string), "| INFO-SERVER | O Moderador %s kickou o jogador %s (Motivo: %s)", aname,pname,result); //nao aparece que eu fui banido,somente aquela mensagem
SendClientMessageToAll(AdminCor, string);
}
format(string, sizeof(string), "| INFO-SERVER | O Administrador %s kickou o jogador: %s. (Motivo: %s)", aname,pname,result);
SendClientMessageToAll(tcadm, string);
GameTextForPlayer(plid,"~b~kickado~w~!", 2500, 3);
SendClientMessage(plid, Vermelho, "* Vocк foi kickado do servidor!");
}
}else{
format(string, sizeof(string), "| ERRO | ID : %d nгo й valido!", plid);
SendClientMessage(playerid, Vermelho, string);
}
}
return 1;
}
Reply
#2

up +++
Reply
#3

Quote:

if(pAdmin[playerid]== 1)//se pAdmin[jogadorid] for igual 1 ou seja moderador vai acontecer oq ta embaixo
{
format(string, sizeof(string), "| INFO-SERVER | O Moderador %s kickou o jogador %s (Motivo: %s)", aname,pname,result); //nao aparece que eu fui banido,somente aquela mensagem
SendClientMessageToAll(AdminCor, string);
}
if(pAdmin[playerid]== o nivel de adm)//se pAdmin[jogadorid] for igual 1 ou seja adm vai acontecer oq ta embaixo
{
format(string, sizeof(string), "| INFO-SERVER | O adm %s kickou o jogador %s (Motivo: %s)", aname,pname,result); //nao aparece que eu fui banido,somente aquela mensagem
SendClientMessageToAll(AdminCor, string);
}

Nessa parte ai й sу fazer igual no IF para moderador e acho que й melhor tu por o nivel maximo de adm de fez ficar pondo todos.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)