Last active
August 29, 2015 14:14
-
-
Save JoSchaap/09248dd6f123830650cf to your computer and use it in GitHub Desktop.
A3Wasteland v1.1 MySQL Query examples - more info at the forums of www.a3wasteland.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* show the ammount of players in your database */ | |
select count(*) as 'players in database' from playerinfo; | |
/* show the ammount of vehicles in the datbase */ | |
select count(*) as 'vehicles in database' from servervehicles; | |
/* show the ammount of objects in the datbase */ | |
select count(*) as 'objects in database' from serverobjects; | |
/* delete all player info, saves and stats | |
!! ONLY DO THIS WITH THE SERVER OFFLINE !! */ | |
delete from playerinfo; | |
delete from playersave; | |
delete from playerstats; | |
delete from playerstatsmap; | |
delete from banktransferlog; | |
/* delete all server objects and vehicles | |
!! ONLY DO THIS WITH THE SERVER OFFLINE !! */ | |
delete from serverobjects; | |
delete from servervehicles; | |
/* whipe the entire database (recreates tables, faster then deleting) | |
!! ONLY DO THIS WITH THE SERVER OFFLINE !! */ | |
truncate table adminlog; | |
truncate table antihacklog; | |
truncate table banktransferlog; | |
truncate table playerinfo; | |
truncate table playersave; | |
truncate table playerstats; | |
truncate table playerstatsmap; | |
truncate table serverinstance; | |
truncate table servermap; | |
truncate table serverobjects; | |
truncate table servervehicles; | |
/* find player UID based on (part of) his/her ingame name */ | |
select UID from playerinfo where Name like '%JoSchaap%'; | |
/* find all vehicles 'owned' by a specific player UID */ | |
select * from servervehicles where variables like '%76561197960482553%'; | |
/* find all objects 'locked' by a specific player UID */ | |
select * from serverobjects where variables like '%76561197960482553%'; | |
/* example of resetting a certain players base and vehicles so they won't be deleted | |
due to his vacation/brokenpc or some other reason | |
DO THIS WITH THE SERVER OFFLINE OR WHILE RESTARTING */ | |
update serverobjects set LastInteraction = NOW(), Damage=0 where Variables like '%76561197960482553%'; | |
update servervehicles set LastUsed = NOW(), Damage=0 where Variables like '%76561197960482553%'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment