Automaticly give staff members Donation points via command ingame :
Create new column Staff in [PS_UserData].[dbo].[Users_Master] :
Code:
ALTER TABLE [PS_UserData].[dbo].[Users_Master] ADD Staff int
Code:
UPDATE [PS_UserData].[dbo].[Users_Master] SET Staff = 1 WHERE UserID = '[GS]A' or UserID = '[GMA]B' /* and so on */
Code:
/* Automaticly points for staff via command */ /* UserUID = ADM Account ID */ IF (@UserUID = 1 or @UserUID = 2 or @UserUID= 3 and @ChatData ='StaffReward123' /* can be anything , make a unique string to avoid mistakes*/) BEGIN UPDATE PS_UserData.dbo.Users_Master Set Point= Point + 1000 /* add 1000 points */ Where Staff= 1 END
UPDATE : StaffPointLog table for history
Create new table at PS_UserData
Code:
Create Table StaffPointLog (Description varchar(50),HistoryTime datetime)
Code:
Insert Into PS_UserData.dbo.StaffPointLog (Description,HistoryTime) Values ('Added Staff Reward',@ChatTime)
Im new at SQL so dont judge me , i am still learning and i tought it was a usefull script for some servers with a Staff rewarding,
SvHe






