SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 02/01/2020, 04:28 PM   #1
Flofey
Little Clucker
 
Flofey's Avatar
 
Join Date: Oct 2018
Location: South the moon
Posts: 36
Reputation: 11
Default Checking if player is banned

so here is my code

PHP Code:
    if(fexist(string))
    {
        new 
INI:file INI_Open(string);
        if(
INI_WriteInt(file,"Banned",1))
        {
        
INI_WriteInt(file,"Banned",0);
        
INI_Close(file);
        
format(string1,sizeof(string1),"{ffa700}%s has been unbanned from CvR by an administrator!",params);
        
SendClientMessageToAll(-1,string1);
        }
        else
        {
        
SCM(playerid,0xf8f8f8fff,"ERROR: {ffffff}player is not banned!");
        }
        
    }
    else
    {
    
SendClientMessage(playerid,-1,"{ffa700}ERROR: Account not found");
    } 
and im getting this

Code:
 warning 209: function "INI_WriteInt" should return a value
is there any possbile way to check if player is banned or not?
__________________
Discord: Flofey#8478
Flofey is offline   Reply With Quote
Old 02/01/2020, 05:24 PM   #2
xRadical3
Gangsta
 
Join Date: May 2017
Location: Iran
Posts: 643
Reputation: 47
Default Re: Checking if player is banned

pawn Code:
if(INI_Int(file, "Banned") == 1)
xRadical3 is offline   Reply With Quote
Old 02/01/2020, 06:06 PM   #3
Flofey
Little Clucker
 
Flofey's Avatar
 
Join Date: Oct 2018
Location: South the moon
Posts: 36
Reputation: 11
Default Re: Checking if player is banned

Quote:
Originally Posted by Vizi10 View Post
pawn Code:
if(INI_Int(file, "Banned") == 1)
Compiler crashed :_
__________________
Discord: Flofey#8478
Flofey is offline   Reply With Quote
Old 02/01/2020, 06:14 PM   #4
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,885
Reputation: 1337
Default Re: Checking if player is banned

You have already failed using ini for anything to do with bans no matter how good you do it.
Pottus is offline   Reply With Quote
Old 02/01/2020, 06:22 PM   #5
Flofey
Little Clucker
 
Flofey's Avatar
 
Join Date: Oct 2018
Location: South the moon
Posts: 36
Reputation: 11
Default Re: Checking if player is banned

Quote:
Originally Posted by Pottus View Post
You have already failed using ini for anything to do with bans no matter how good you do it.
oh that make sense
__________________
Discord: Flofey#8478
Flofey is offline   Reply With Quote
Old 02/01/2020, 06:24 PM   #6
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,885
Reputation: 1337
Default Re: Checking if player is banned

Yes it does use mysql or sqlite you simply will not achieve any kind of good ban system with ini it's such a /fail not even funny dude.
Pottus 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
Checking if player is banned justjamie Scripting Help 2 21/05/2016 01:58 PM
Checking if player is banned LeXuZ Scripting Help 10 04/12/2014 04:07 PM
When player connect (if banned) shows dialog that he is banned! SplinteX Scripting Help 2 22/12/2013 04:35 PM
Banning through MySQL and checking if player is banned PaulDinam Scripting Help 2 15/02/2013 09:45 PM
If player is banned Kingunit Help Archive 12 08/08/2011 02:02 AM


All times are GMT. The time now is 05:23 PM.


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