1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

MySQL or HL2RP problem.

Discussion in 'Discussion' started by [email protected], Jan 6, 2013.

  1. DIABLO@58

    [email protected] The Crew - Founder

    This may not be a problem with HL2RP, but still.
    For what ever reason, our characters are randomly being banned. It wont display in text saying "Your character has been banned!"
    No, we just try to use them and when we click it says "This character was banned."

    Now the thing is, I touched mySQL a tad a while ago. I changed the name and user of a character, and ever since, this has been happening.

    Are there any ideas on what I need to do or un-do to fix this?
     
  2. connall

    connall Guest

    Have you tried looking at your logs? Search for character ban and see if someone is doing something they aren't?
     
  3. Razor

    Razor Guest

    This has happened to me too.
    Connall, on your server. My City Admin is banned xD (Unless you pulled a trick on me)
     
  4. DIABLO@58

    [email protected] The Crew - Founder

    No one is banning. As soon as I leave and come back my characters are banned.

    BUT. It is only CCA and my "Unknown" Faction.
     
  5. This is happening to me as well, luckily they fixed the /charunban command, really works well for a quick fix, but this error will definitely tick off normal access players.
     
  6. DIABLO@58

    [email protected] The Crew - Founder

    Oh good then its not just me.

    Well guys, seems like we have a mystery on our hands...
     
  7. connall

    connall Guest

    No I didn't. Oh dear :/ Anybody put this in the bug reporter thingy ma jig yet?
     
  8. Razor

    Razor Guest

    Might be a whitelist issue. if you get ubwhitelisted your whitelist-requiring chars get banned.
     
  9. DIABLO@58

    [email protected] The Crew - Founder

    That would make sense because when ever I have to re-create those characters I have to re-add myself to that whitelist.
     
  10. Razor

    Razor Guest

    Might be that the whitelist command doesn't send the update immediately but waits for autosave.
    Not sure tho
     
  11. DIABLO@58

    [email protected] The Crew - Founder

    Do you know where the whitelist commands are located? If they are not in the Faction files already?
    I would like to go have a look
     
  12. Clockwork commands folder.
     
  13. DIABLO@58

    [email protected] The Crew - Founder

    Here are my command files for plywhitlist

    Code:
    --[[
    	© 2012 CloudSixteen.com do not share, re-distribute or modify
    	without permission of its author ([email protected]).
    --]]
    
    local Clockwork = Clockwork;
    
    local COMMAND = Clockwork.command:New("PlyWhitelist");
    COMMAND.tip = "Add a player to a whitelist.";
    COMMAND.text = "<string Name> <string Faction>";
    COMMAND.access = "s";
    COMMAND.arguments = 2;
    
    -- Called when the command has been run.
    function COMMAND:OnRun(player, arguments)
    	local target = Clockwork.player:FindByID(arguments[1])
    	
    	if (target) then
    		local factionTable = Clockwork.faction:FindByID(table.concat(arguments, " ", 2));
    		
    		if (factionTable) then
    			if (factionTable.whitelist) then
    				if (!Clockwork.player:IsWhitelisted(target, factionTable.name)) then
    					Clockwork.player:SetWhitelisted(target, factionTable.name, true);
    					Clockwork.player:SaveCharacter(target);
    					
    					Clockwork.player:NotifyAll(player:Name().." has added "..target:Name().." to the "..factionTable.name.." whitelist.");
    				else
    					Clockwork.player:Notify(player, target:Name().." is already on the "..factionTable.name.." whitelist!");
    				end;
    			else
    				Clockwork.player:Notify(player, factionTable.name.." does not have a whitelist!");
    			end;
    		else
    			Clockwork.player:Notify(player, table.concat(arguments, " ", 2).." is not a valid faction!");
    		end;
    	else
    		Clockwork.player:Notify(player, arguments[1].." is not a valid player!");
    	end;
    end;
    
    COMMAND:Register();
    And my plyunwhitelist

    Code:
    --[[
    	© 2012 CloudSixteen.com do not share, re-distribute or modify
    	without permission of its author ([email protected]).
    --]]
    
    local Clockwork = Clockwork;
    
    local COMMAND = Clockwork.command:New("PlyUnwhitelist");
    COMMAND.tip = "Remove a player from a whitelist.";
    COMMAND.text = "<string Name> <string Faction>";
    COMMAND.access = "s";
    COMMAND.arguments = 2;
    
    -- Called when the command has been run.
    function COMMAND:OnRun(player, arguments)
    	local target = Clockwork.player:FindByID(arguments[1])
    	
    	if (target) then
    		local factionTable = Clockwork.faction:FindByID(table.concat(arguments, " ", 2));
    		
    		if (factionTable) then
    			if (factionTable.whitelist) then
    				if (Clockwork.player:IsWhitelisted(target, factionTable.name)) then
    					Clockwork.player:SetWhitelisted(target, factionTable.name, false);
    					Clockwork.player:SaveCharacter(target);
    					
    					Clockwork.player:NotifyAll(player:Name().." has removed "..target:Name().." from the "..factionTable.name.." whitelist.");
    				else
    					Clockwork.player:Notify(player, target:Name().." is not on the "..factionTable.name.." whitelist!");
    				end;
    			else
    				Clockwork.player:Notify(player, factionTable.name.." does not have a whitelist!");
    			end;
    		else
    			Clockwork.player:Notify(player, factionTable.name.." is not a valid faction!");
    		end;
    	else
    		Clockwork.player:Notify(player, arguments[1].." is not a valid player!");
    	end;
    end;
    
    COMMAND:Register();
     
  14. Whitelist saves immediately, so I doubt it'd be a saving issue.
     
  15. DIABLO@58

    [email protected] The Crew - Founder

    That's what I thought, I haven't touched Whitelists other than my new faction. But I have created my own Vort and CWU faction and this has never happened.

    Could it just be a bug within HL2RP?
     
  16. Well there is a bug report on the issue, but I can't reproduce it and no one seems to be getting any serverside or clientside errors, so there's not much I can do to try and fix it.
     
  17. alexgrist

    alexgrist Guest

    I think it's probably something to do with the Garry JSON to regular JSON, I'm not sure though. If you're able to do it on demand can you give me the _Data table contents of a character when you've done it and also when you've rejoined the server.
     
  18. DIABLO@58

    [email protected] The Crew - Founder

    Alex, can you just give me a step by step guide to do this?
    Still new to the whole fixing thing.

    Doesn't have to be in depth though.
     
  19. DIABLO@58

    [email protected] The Crew - Founder

    Plus, the /charunban command does work. If I don't use that command, I have to re-add myself to the whitelist, if I un-ban the character, I dont.
     
  20. alexgrist

    alexgrist Guest

    I need you to get a MySQL client or phpmyadmin if you have access to it, join your server and do whatever you need to do to make the character ban happen and get the_Data from that character once you've disconnected and on e again after you've reconnected. I think it's character banning you as a result of not being able to decode the whitelist JSON correctly. I'll take a look at the code later, I need to fix Clockwork for OS X since I can't test things with it broken.
     

Previous Readers (Total: 0)