22.12.2011, 11:34
Isto deve resolver o seu problema
:
Apenas troque o seu comando por este
:
Espero ter ajudado
.
![afro](images/smilies/mrgreen.gif)
Apenas troque o seu comando por este
![Tongue](images/smilies/razz.gif)
pawn Код:
if(strcmp(cmd,"/BanirTempo", true)==0)
{
if(IsPlayerAdmin(playerid))
{
new aname[MAX_PLAYER_NAME];
new idname[MAX_PLAYER_NAME];
new id, tempo, tmp[128];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, Vermelho, "[>] Digite: /BanirTempo [Id] [Tempo] [Motivo]");
id = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, Vermelho, "[>] Digite: /BanirTempo [Id] [Tempo] [Motivo]");
tempo = strval(tmp);
if(tempo >= 200) return SendClientMessage(playerid, Vermelho, "[>] O Tempo maximo й 500 min");
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)) return SendClientMessage(playerid, Vermelho, "[>] Digite: /BanirTempo [Id] [Tempo] [Motivo]");
GetPlayerName(id, idname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, idname);
if(IsPlayerConnected(id))
{
if(tempo >= 1)
{
dini_IntSet(file2, "minutosbanidos", tempo);
format(string, sizeof(string), "O Adminstrador %s [ID: %d] Baniu Temporariamente o Jogador %s, por: %d minutos (Motivo: %s)", aname, playerid, idname ,tempo ,result);
SendClientMessageToAll(0x11B1FFAA, string);
}
}
else
{
SendClientMessage(playerid, Vermelho, "(ERRO) Jogador nгo conectado.");
}
}
return true;
}
Espero ter ajudado
![Tongue](images/smilies/razz.gif)