SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 07/04/2016, 05:58 PM   #1
GeneralAref
Huge Clucker
 
Join Date: Nov 2015
Posts: 313
Reputation: 2
Default timeban

PHP Code:
public OnPlayerConnect(playerid){
    new 
file[256];format(file,sizeof(file),UserFile,PlayerName(playerid));
    if(
dini_Exists(file)){
        if(
bool:dini_Bool(file,"Timeban")==true){
            if(
gettime()<dini_Int(file,"Bantime")){
                new 
str[256];format(str,sizeof(str),"You have been temporary banned from the server by admin %s for %s.%d second(s) remaining",dini_Get(file,"Adminban"),dini_Get(file,"Reasonban"),dini_Int(file,"Bantime")-gettime());
                
SendClientMessage(playerid,COLOR_RED,str),SetTimerEx("KickPlayer",100,false,"i",playerid);
                return 
0;}
            if(
gettime()>dini_Int(file,"Bantime"))dini_BoolSet(file,"Timeban",false),dini_IntSet(file,"Bantime",0),SendClientMessage(playerid,COLOR_RED,"You have been unbanned.");}
        
ShowPlayerDialog(playerid,LoginDialog,DIALOG_STYLE_PASSWORD,""#COL_GREEN"Login",""#COL_WHITE"Your account has been "#COL_GREEN"registered "#COL_WHITE"in the system.\nEnter your password below for login in to your account.","Login","Cancel");}
    
else ShowPlayerDialog(playerid,RegisterDialog,DIALOG_STYLE_INPUT,""#COL_GREEN"Register",""#COL_WHITE"Your account is not "#COL_RED"registered "#COL_WHITE"in the system.\nEnter your password below for create new account.","Register","Cancel");
    
return 1;} 
when i connecting to the server send unban message to me but i set Timeban in file true and Bantime = 9999999999 plz help me.
GeneralAref is offline   Reply With Quote
Old 07/04/2016, 06:00 PM   #2
iKevin
Gangsta
 
iKevin's Avatar
 
Join Date: Nov 2015
Location: In my throne
Posts: 564
Reputation: 71
Default Re: timeban

Show the ban command.
iKevin is offline   Reply With Quote
Old 07/04/2016, 06:09 PM   #3
GeneralAref
Huge Clucker
 
Join Date: Nov 2015
Posts: 313
Reputation: 2
Default Re: timeban

i set this in player file without command but not work.
GeneralAref is offline   Reply With Quote
Old 07/04/2016, 06:14 PM   #4
Logic_
Banned
 
Join Date: Jun 2015
Posts: 1,508
Reputation: 305
Default Re: timeban

Your code is wrong.
Logic_ is offline   Reply With Quote
Old 07/04/2016, 06:21 PM   #5
GeneralAref
Huge Clucker
 
Join Date: Nov 2015
Posts: 313
Reputation: 2
Default Re: timeban

where?
GeneralAref is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ban cmd > timeban pls! rouse Scripting Help 1 15/03/2016 08:52 PM
[NEED] Timeban Fantje Scripting Help 2 15/03/2015 01:32 PM
Timeban EmpireSk Scripting Help 2 14/01/2015 08:23 PM
Timeban EmpireSk Scripting Help 4 21/08/2013 11:51 AM
Timeban sim_sima Scripting Help 3 23/11/2011 01:24 PM


All times are GMT. The time now is 07:09 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.