Need help +rep
#1

Код:
SA-MP Dedicated Server
----------------------
v0.3e-R2, ©2005-2012 SA-MP Team

[18:19:37] filterscripts = ""  (string)
1 
1 Server Plugins
1 --------------
1  Loading plugin: streamer
1 

*** Streamer Plugin v2.5.2 by Incognito loaded ***

1   Loaded.
1  Loading plugin: mysql
1 

  > MySQL plugin R4-2 successfully loaded.

1   Loaded.
1  Loading plugin: sscanf
1 

1  ===============================

1       sscanf plugin loaded.     

1    © 2009 Alex "******" Cole

1  ===============================

1   Loaded.
1  Loaded 3 plugins.

1 
1 Filterscripts
1 ---------------
1   Loaded 0 filterscripts.

1 Incoming connection: 127.0.0.1:64497
1 Incoming connection: 127.0.0.1:64498
1 AllowAdminTeleport() : function is deprecated. Please see OnPlayerClickMap()
1 Incoming connection: 127.0.0.1:64499
1 *************************************************
1 *        Las Venturas Cops 'n' Robbers          *
1 *              Version Alpha 1.0               *
1 *                                               *
1 *             Created By Kyle Smith             *
1 *                                               *
1 * Not To Be Distributed Under Any Circumstances *
1 *                                               *
1 *            Kyle.Smith09@live.com              *
1 *                                               *
1 *            Copyright 2010 - 2012 ©            *
1 *                                               *
1 *************************************************
1  
1 Number of vehicle models: 65
1 [npc:join] [BOT]Pendelbury has joined the server (0:127.0.0.1)
1 [BOT]Pendelbury[0] Has Connected to the Server
1 * [BOT]Pendelbury(0) Has Left The Server. (Kicked/Banned)
1 [npc:part] [BOT]Pendelbury has left the server (0:2)
1 [npc:join] [BOT]Felix has joined the server (1:127.0.0.1)
1 [BOT]Felix[1] Has Connected to the Server
1 * [BOT]Felix(1) Has Left The Server. (Kicked/Banned)
1 [npc:part] [BOT]Felix has left the server (1:2)
1 [npc:join] [BOT]TheStig has joined the server (2:127.0.0.1)
1 [BOT]TheStig[2] Has Connected to the Server
1 * [BOT]TheStig(2) Has Left The Server. (Kicked/Banned)
1 [npc:part] [BOT]TheStig has left the server (2:2)
1 Incoming connection: 192.168.1.102:52630
1 [join] ScarFace has joined the server (0:192.168.1.102)
1 ScarFace[0] Has Connected to the Server
1 * ScarFace(0) Has Left The Server. (Kicked/Banned)
1 [part] ScarFace has left the server (0:2)
I don't why server is banning players? can u tell me
Reply
#2

Please show the code which is under OnPlayerConnect, it is most likely banning local adresses from the server. (192.168...)
Reply
#3

Код:
public OnPlayerConnect(playerid)
{
    UserStats[playerid][SpawnedBefore] = 0;
    
	GetPlayerIp(playerid, PlayerIP[playerid], 32);

	AdvertString1[playerid] = " ";
	AdvertString2[playerid] = " ";
	AdvertString3[playerid] = " ";
		
    SetPlayerTime(playerid, 0, 0);
    GetPlayerName(playerid, UserStats[playerid][Name], MAX_PLAYER_NAME);
    printf("%s[%d] Has Connected to the Server",UserStats[playerid][Name],playerid);

	new query[156],plrIP[16];

 	GetPlayerIp(playerid, plrIP, sizeof(plrIP));

    CheckMySQL();
	format(query,sizeof(query),"SELECT * FROM bans WHERE IP = '%s'", plrIP);
	mysql_query(query);

	mysql_store_result();

	new Reason[50],Date[50],string2[156];


    if(mysql_affected_rows())
	{

		new row[128]; // The length of 1 'row' total.
		new field[5][32]; // [4] = Amount of fields, [24] = Max length of the bigest field.

		mysql_fetch_row_format(row, "|");
		explode(row, field, "|");
		mysql_free_result();

		Reason = field[2];
		Date = field[4];

		SendClientMessage(playerid, 0xFFFFFFFF, "________________________________________________");
		SendClientMessage(playerid, 0xFF0000FF, "You Have A Previous Ban Currently Outstanding.");
		SendClientMessage(playerid, 0xF74646FF, "Reason:");
		SendClientMessage(playerid, 0xFF0000FF, " ");
		format(string2,sizeof(string2),"%s",Reason);
		SendClientMessage(playerid, 0x00B359FF, string2);
		SendClientMessage(playerid, 0x0693D7FF, "If you have a complaint about this ban,");
		format(string2,sizeof(string2),"go to the website at %s",WebsiteText);
		SendClientMessage(playerid, 0x0693D7FF, string2);
		SendClientMessage(playerid, 0xFFFFFFFF, "________________________________________________");
		PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);

		Kick(playerid);
		mysql_free_result();
		return mysql_free_result();
	}

	new Namee[30];
	GetPlayerName(playerid,Namee,30);
	format(query,sizeof(query),"SELECT * FROM bans WHERE Name = '%s'", Namee);
	mysql_query(query);

	mysql_store_result();

    if(mysql_affected_rows())
	{
		mysql_fetch_row_format(row, "|");
		explode(row, field, "|");
		mysql_free_result();

		Reason = field[2];
		Date = field[4];

		SendClientMessage(playerid, 0xFFFFFFFF, "________________________________________________");
		SendClientMessage(playerid, 0xFF0000FF, "You Have A Previous Ban Currently Outstanding.");
		SendClientMessage(playerid, 0xF74646FF, "Reason:");
		SendClientMessage(playerid, 0xFF0000FF, " ");
		format(string2,sizeof(string2),"%s",Reason);
		SendClientMessage(playerid, 0x00B359FF, string2);
		SendClientMessage(playerid, 0x0693D7FF, "If you have a complaint about this ban,");
		format(string2,sizeof(string2),"go to the website at %s",WebsiteText);
		SendClientMessage(playerid, 0x0693D7FF, string2);
		SendClientMessage(playerid, 0xFFFFFFFF, "________________________________________________");
		PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);

		Kick(playerid);
		mysql_free_result();
		return mysql_free_result();
	}
Reply
#4

someone help me?
Reply
#5

Hang on a second please

EDIT: Sorry, i was not able to locate any problems in your script, and i do suspect you have a problem with your MySQL database.
Reply
#6

look in samp.ban and delete all the content in the file, save it and try again restarting the samp-server.exe
Reply
#7

Quote:
Originally Posted by JavoDiaz
Посмотреть сообщение
look in samp.ban and delete all the content in the file, save it and try again restarting the samp-server.exe
Wont work as it is MySQL based ban system. But nice thought though.
Reply
#8

So i need to wait for Kylesmith because that script made by kylesmith and If he want help me so I'd be obliged.
Reply
#9

Okay check this maybe i got problem from there?

Код:
#define TESTINGSERVER
//#define TESTINGSERVER2

#if defined TESTINGSERVER
#define MYSQL_HOST	"localhost"
#define MYSQL_USER	"root"
#define MYSQL_DB	"lasvent"
#define MYSQL_PASS 	"****"
#endif

#if defined TESTINGSERVER2
#define MYSQL_HOST	"localhost"
#define MYSQL_USER	"root"
#define MYSQL_DB	"lasvent"
#define MYSQL_PASS 	"****"
#endif
Reply
#10

I've no clue, this script is 2 years old.

It's pretty buggy, I don't advise using it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)