I try to witre auto ban for players who play in both fraction
First i cerate table 'bot" to wirte logs
And next i try to add Insert logs to new table in usp_Insert_Action_Log_E
Like that:
But logs is not inserted to a ew table ;/
First i cerate table 'bot" to wirte logs
Code:
USE [PS_GameLog] GO /****** Object: Table [dbo].[Bot] Script Date: 2014-09-27 16:13:16 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Bot]( [row] [int] IDENTITY(1,1) NOT NULL, [UserUID] [int] NULL, [UserID] [int] NULL, [UserIP] [tinyint] NULL, [Country] [int] NULL, [Actiontime] [datetime] NULL ) ON [PRIMARY] GO
Like that:
Code:
IF (@ActionType = '107')
BEGIN
IF EXISTS (SELECT * FROM PS_GameLog.dbo.Bot)
BEGIN
DECLARE @UserIP varchar(15)
DECLARE @Country tinyint
SET @UserUID= (Select UserIP from PS_UserData.dbo.Users_Master where UserUID=@UserUID)
SET @UserID= (Select UserID from PS_UserData.dbo.Users_Master where UserUID=@UserUID)
SET @UserIP= (Select UserIP from PS_UserData.dbo.Users_Master where UserUID=@UserUID)
SET @Country = (SELECT Country FROM PS_GameData.dbo.UserMaxGrow WHERE UserUID=@UserUID)
SET @ActionTime =GETDATE()
IF (@ActionType ='107')
BEGIN
INSERT INTO PS_GameLog.dbo.Bot(UserUID,UserID,UserIP,Country,ActionTime) values (@UserUID,@UserID,@UserIP,@Country,@ActionTime)
END
END
END