[FilterScript] Hours Ban system
#1

Here is another one FS.

Here you can ban players on hours (3 MAX). When you ban player he will get unbanned automaticly after x hours

If you want to change how max hours you want to ban just change this
PHP код:
if(hour || hour 0
To whatever you want

Here is PASTEBIN: http://pastebin.com/QPZb69kn
Here is DOWNLOAD: https://www.sendspace.com/file/2whgxv

You'll need IZCMD: Included there
You'll need SSCANF latest version: Included there

Hope you like it guys
Reply
#2

Copy -paste = edit,you failed on translation

any credits for author?
Reply
#3

What makes you think that this is edit??

Of course I will fail on making scripts in english. I am from montenegro and look at my native language..
And when I translate script I always leave the credits (unless it is my FS) like I did here.. https://sampforum.blast.hk/showthread.php?tid=619873
Reply
#4

I don't get the purpose.. Hmm.. You can juste use a simply system like:
PHP код:
YourBanCmd:
    
pAccount[cible][pBan] = true;
    
pAccount[cible][pBanTime] = time*60*60*24 gettime();
// Time is the number of day.
// WhenThePlayerConnect - Kick him, example:
if(gettime() < pAccount[playerid][pBanTime])
        {
            new 
jour,
                
heure,
                
minute,
                
secondes;
            
TimeToDate(pAccount[playerid][pBanTime]-gettime(), __jourheureminutesecondes);
            
SCMF(playeridRED"Vous кtes banni du serveur pour encore %02i jours, %02i heures, %02i minutes, %02i secondes"jourheureminutesecondes);
            
SetTimerEx("kick"200false"i"playerid);
            
ResetPlayerStats(playerid);
            return 
1;
        }
// ----
TimeToDate(time, &annee 0, &mois 0, &jour 0, &heure 0, &minute 0, &seconds 0)
{
    
seconds time 60;
    
minute time 60;
    
heure minute 60;
    if(
minute >= 60)
        
minute %= 60;
    
jour heure 24;
    if(
heure >= 24)
        
heure %= 24;
    
mois     jour 30;
    if(
jour >= 30)
        
heure %= 30;
    
annee mois 12;
    if(
mois >= 12)
        
mois %= 12;

(I'll translate the code later. :$)
Reply
#5

Here you write in file who is banned, time left and they are all in one place.. and you can unban player
Reply
#6

Nesto mi je poznato ovo xD Neznam dali je tvoje ali trebalo bi koristit nekome

Good for newbies
Reply
#7

Just a heads up using INI for a ban system is a very poor choice use mysql/sqlite and do it proper.... In fact just throw any INI usage away you don't need it for any kind of system.
Reply
#8

Can i get izcmd ?
Reply
#9

Exlivebs Here you are, IZCMD - Command Processor
Reply
#10

Thx guys for comments

Quote:
Originally Posted by Exlivebs
Посмотреть сообщение
Can i get izcmd ?
You have IZCMD in download file at sendspace..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)