Thread: ≈ help needed PLEASE!!
View Single Post
Old 17.10.2005, 22:19   #7
BiGBoY
Архивный участник
 
Join Date: May 2005
Posts: 216
Default Re: help needed PLEASE!!

Quote:
Originally Posted by nitromaxboi
can someone please post the sql query command to ban a char account, check char id to see which account it links to.
Just add accountname in line: SET @accountname = 'nitromaxboi'
and set action in: SET @action = 'ban' or SET @action = 'unban'
Code:
DECLARE @accountname varchar(30)
SET @accountname = ''
DECLARE @action varchar(30)
SET @action = 'ban'

Use Lin2DB

IF @action = 'ban'
BEGIN
UPDATE User_Account SET block_flag = 1 WHERE account = @accountname
UPDATE User_Account SET block_flag2 = 1 WHERE account = @accountname
PRINT 'Selected account has been banned'
END
ELSE
IF @action = 'unban'
BEGIN
UPDATE User_Account SET block_flag = 0 WHERE account = @accountname
UPDATE User_Account SET block_flag2 = 0 WHERE account = @accountname
PRINT 'Selected account has been unbanned'
END
This is to check char info:
for instance: SET @charname = 'nitromaxboi'
Code:
DECLARE @charname varchar(30)
SET @charname = ''

Use Lin2World
Select * From User_Data WHERE char_name = @charname
Go
BiGBoY is offline