[Ajuda] Server Closed Connection.
#1

Bom gente , estou aqui para pedir a ajuda de vocкs ; quando dou /kick , nгo aparece o motivo , sу aparece o server closed connection. !! Vou deixar uma imagem e o code do /kick !
Imagem : http://i.imgur.com/ekkEqZb.jpg
Code /Kick :
pawn Код:
if(strcmp(cmd, "/kick", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_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, "Digite: /kick [id] [motivo]");
return 1;
}
plid = strval(tmp);
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{
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{0099FF}(~)Adm(~) - {CCCCFF} %s kickou o jogador %s (Motivo: %s)", aname,pname,result);
SendClientMessageToAll(outraadm, string);
SetTimer("KiKaDo", 2500, false);
Kick(plid);
}
}else{
format(string, sizeof(string), "{0099FF}[x]{CCCCFF} ID invбlido!", plid);
SendClientMessage(playerid, Vermelho, string);
}
}
return 1;
}
Espero que consigam me ajudar !! ~~~ Tentei usar um settimer para demorar a kikar o player , mas nao deu bem certo :S
Reply


Messages In This Thread
Server Closed Connection. - by IGp - 28.02.2013, 10:28
Re: Server Closed Connection. - by Joao Pedro - 28.02.2013, 10:32
Re: Server Closed Connection. - by IGp - 28.02.2013, 10:35
Re: Server Closed Connection. - by Joao Pedro - 28.02.2013, 10:38
Re: Server Closed Connection. - by paulor - 28.02.2013, 10:52
Re: Server Closed Connection. - by Sky™ - 28.02.2013, 12:17
Re: Server Closed Connection. - by paulor - 28.02.2013, 12:20

Forum Jump:


Users browsing this thread: 2 Guest(s)