14.03.2010, 03:26
No te recomiendo fijarte de esos comandos.. Son DCMD y para personas nuevas son muy complicados.. Acб te dejo uno sencillo..
Espero que te sirva.. Saludos..
pawn Код:
// Comando de /Ban
if (strcmp(cmd, "/ban", true) == 0)
{
if (InfoNick[playerid][Admin] >=2 || IsPlayerAdmin(playerid)) //Si Tienes Tu Propio Sistema Cambia "InfoNick[playerid][Admin] >=2
{
tmpp = strtok(cmdtext, idx);
if (!strlen(tmpp))
{
SendClientMessage(playerid, COLOR_VERDE, "USA: /Ban [Id] [Razуn]");
return 1;
}
pid = strval(tmpp);
if (!(IsPlayerConnected(pid)))
{
SendClientMessage(playerid, COLOR_ROJO, "Jugador no conectado !");
return 1;
}
GetPlayerName(pid, pidName, sizeof(pidName));
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerIp(playerid,AdminIP,20);
GetPlayerIp(pid, PidIP, 20);
gettime(hora, minuto, segundo);
getdate(anio, mes, dia);
format(string, sizeof(string), "%s (ID: %d) fue baneado !. Razуn: %s | Hora: %d:%d:%d | Dia: %d.%d.%d", pidName, pid, cmdtext[idx], hora, minuto, segundo, dia, mes, anio);
SendClientMessageToAll(COLOR_ROJO, string);
print(string);
Ban(pid);
}
else
{
SendClientMessage(playerid,COLOR_ROJO,"No eres Admin !");
return 1;
}
return 1;
}