SA-MP Forums

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

Thread Tools Display Modes
Old 19/07/2012, 10:53 AM   #1
Big Clucker
liinor's Avatar
Join Date: Dec 2009
Location: Finland
Posts: 119
Reputation: 5
Question Is this kind of reading possible?

Text in Ban.ini liinor lol
pawn Code:
new ConnIP[50];
new server_IP[50];
    format(server_IP, 50, "%d",ConnIP);
    new banreason[256];
    new string2[64]; // Create the string to store the read text in

    new lol[100];
    new named[100];
    new fileip[100];

    new File:example = fopen("Bans.Ini", io_read); // Open the file
    while(fread(example, string2)) //reads the file line-by-line
    format(string2, sizeof(string2), "%d %s %d",fileip,named,banreason);

    if(strcmp(string2, ConnIP, true) == 0) //if any of the lines in the file say "Ban" the system will ban the player

    format(lol,sizeof(lol),"%s who got ban on that ip %s",banreason,named);
    SendClientMessage(playerid,COLOR_ORANGE,"You are banned from the server!");
please i need help.
Horse betting script in sa-mp.
Real Clock Speedometer
liinor is offline   Reply With Quote

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
How to have this kind of IP Ballu Miaa Scripting Help 22 29/12/2011 10:01 PM
A kind of bug. ilikehotgirl Help Archive 2 30/01/2011 09:40 AM
Some kind of bug or something ? xemper Server Support 0 18/01/2011 04:06 PM

All times are GMT. The time now is 08:07 AM.

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