Zed159 Posted August 15, 2019 Share Posted August 15, 2019 (edited) Hello community.. I'm working on a gui panel that lets me ban countries from joining and allow specified people from those countries to enter through their serials: https://imgur.com/a/JZ3Li7O So i would know what functions/events should i use? Edited August 15, 2019 by Zed159 Link to comment
HassoN Posted August 15, 2019 Share Posted August 15, 2019 You need a saving system to save all the banned countries/serials, I'd recommend using SQL functions for that. dbConnect dbExec dbPoll dbQuery And to prevent them from joining you need onPlayerConnect -- when player connects getPlayerSerial -- check if that player has access by his serial or not getPlayerCountry -- I believe this function can be found in the default admin panel cancelEvent -- if that X player doesn't have access. Link to comment
Zed159 Posted August 15, 2019 Author Share Posted August 15, 2019 2 hours ago, HassoN said: You need a saving system to save all the banned countries/serials, I'd recommend using SQL functions for that. dbConnect dbExec dbPoll dbQuery And to prevent them from joining you need onPlayerConnect -- when player connects getPlayerSerial -- check if that player has access by his serial or not getPlayerCountry -- I believe this function can be found in the default admin panel cancelEvent -- if that X player doesn't have access. Oh my god xdd, db is so hard for me I've never used it before Link to comment
WASSIm. Posted August 15, 2019 Share Posted August 15, 2019 You can use XML function its more easy: https://wiki.multitheftauto.com/wiki/XML Link to comment
Zed159 Posted August 16, 2019 Author Share Posted August 16, 2019 I've got an idea, what about i get the rows from the gridlist and add them to a table? and then i check the countries in the table and ban them? if it works, give me examples how to insert the countries in the gridlist into a table Link to comment
HassoN Posted August 16, 2019 Share Posted August 16, 2019 2 hours ago, Zed159 said: I've got an idea, what about i get the rows from the gridlist and add them to a table? and then i check the countries in the table and ban them? if it works, give me examples how to insert the countries in the gridlist into a table I wouldn't recommend that because if you restart your script everything will be gone. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now