21.01.2015, 16:47
Olб a todos, estou aqui com um problema no meu comando /kick e /ban..
Tipo assim, quando eu vou kickar alguйm, aparece lб "O Administrador BLABLA kickou o jogador BLABLA. Motivo :
Sу que tipo, ele nгo mostra quem foi kickado, sу mostra o meu nome e meu nome no jogador kickado:/ alguйm pode ajudar? Isso serve pro comando ban tambйm.
Cуdigo :
Cуdigo do comando BAN..
Tipo assim, quando eu vou kickar alguйm, aparece lб "O Administrador BLABLA kickou o jogador BLABLA. Motivo :
Sу que tipo, ele nгo mostra quem foi kickado, sу mostra o meu nome e meu nome no jogador kickado:/ alguйm pode ajudar? Isso serve pro comando ban tambйm.
Cуdigo :
pawn Код:
CMD:kick(playerid, params[]) {
new Motivo[48], string[174], pName[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerName(playerid, aname, sizeof(aname));
if(!IsPlayerAdmin(playerid)) return Msg(playerid, -1, NADM);
if(sscanf(params, "us", ID, Motivo)) return Msg(playerid, -1, "{FF0000}USE :{FFFFFF}/kick [ID] [MOTIVO] .");
if(!IsPlayerConnected(ID)) return Msg(playerid, -1,"Jogador nгo estб online!");
if(strlen(Motivo) > 48) return Msg(playerid, VERMELHO,"Use no mбximo 48 caracteres no motivo!");
Kick(ID);
format(string, sizeof(string),"{FF0000}-| O Administrador %s [ID:%d] kickou o jogador %s [ID:%d]. Motivo : %s |-", aname, ID, pName, ID, Motivo);
MsgToAll(-1,string);
return 1;
}
pawn Код:
CMD:ban(playerid, params[]) {
new Motivo[48], string[174], pName[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerName(playerid, aname, sizeof(aname));
if(!IsPlayerAdmin(playerid)) return Msg(playerid, -1, NADM);
if(sscanf(params, "us", ID, Motivo)) return Msg(playerid, -1, "{FF0000}USE :{FFFFFF}/ban [ID] [MOTIVO] .");
if(!IsPlayerConnected(ID)) return Msg(playerid, -1,"Jogador nгo estб online!");
if(strlen(Motivo) > 48) return Msg(playerid, VERMELHO,"Use no mбximo 48 caracteres no motivo!");
Ban(ID);
format(string, sizeof(string),"{FF0000}-| O Administrador %s [ID:%d] baniu o jogador %s [ID:%d]. Motivo : %s |-", pName, ID, aname, ID, Motivo);
MsgToAll(-1,string);
return 1;
}