23.01.2012, 23:22
Fiz um script para vocк, nгo testei.
Como usar?
Avisando novamente, nгo testei, por favor, teste e me responda ^^
ah, necessita da include Dini.
pawn Код:
stock BanirTemp(pid, motivo[] = "S/M", dias)
{
new N[50], d,m,a; GetPlayerName(pid, N, 24); getdate(a,m,d);
strcat(N,".BAN");
#if defined _dini_included
dini_Create(N);
dini_IntSet(N, "Dias", d+dias);
dini_Set(N, "Motivo", motivo);
#endif
Kick(pid);
return 1;
}
// Adicione no comeзo do OnPlayerConnect
public OnPlayerConnect(playerid)
{
new N[50], d,m,a; GetPlayerName(playerid, N, 24); getdate(a, m, d);
strcat(N,".BAN");
#if defined _dini_included
if(fexist(N))
{
if(dini_Int(N, "Dias") < d)
{
new str[128];
format(str, sizeof(str),"Faltam %d dias para vocк ser desbanido. ( Motivo: %s )", dini_Int(N, "aTDia"), dini_Get(N, "Motivo"));
SendClientMessage(playerid, -1, str);
Kick(playerid);
}
if(dini_Int(N, "Dias") == d)
{
fremove(N);
}
}
#endif
return 1;
}
pawn Код:
BanirTemp(playerid, "No-reload", 3); // Banirб o player por No-reload por 3 dias.
Avisando novamente, nгo testei, por favor, teste e me responda ^^
ah, necessita da include Dini.