Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- @Nome: banir player temporariamente
- @Créditos: [iPs]SuYaNw
- */
- 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;
- }
- stock VerifyPlayer(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
- }
- // Como Usar:
- BanirTemp(playerid, "No-reload", 3); // Banirá o player por No-reload por 3 dias.
Advertisement
Add Comment
Please, Sign In to add comment