Few questions.
#1

Hello, I have a few questions hopefully someone can help me with. (NOTE: This is ALL MySQL)

1) If I use SAMPs ban system ( ban(playerid) ) how would I make an /unban command?

2) how to offline ban someone? (Command)

3) Most importantly, once someone types their password, how would I make it show another dialog showing what team for them to join? then it spawns them.

thanks!
Reply
#2

Anyone?
Reply
#3

1. You would have to store their IP and use the RCON command unbanip to unban the IP.
2. You would have to store their IP and use the RCON command banip to ban the IP.
3. If you have created a password dialog, which is way more advanced dialog than some team choosing dialog, I don't understand why you cannot make this. Search for a dialog tutorial or something.
Reply
#4

Alright...
1) On the /ban command, write in the player's file that he is "banned", on the /unban command, check if the file has "banned" set to 1, if it is, that means he IS banned, if not, that means he's not, and from there you can unban...
2) Offline ban? I guess this means it's an account ban, so it's related to your player files in the database?
3) Use the ShowPlayerDialog function, and OnDialogResponse callback (you can find these on wikipedia, just ******)


Glad to help
Reply
#5

3) I mean like, (dialog wise) once they press Login or Register it sends them another dialog straight away, I cannot get this right..
Reply
#6

The callback OnDialogResponse is called when the player click in dialog buttons.

After check if the given password(inputtext) is right, show the team dialog.
If you can't understand post your OnDialogResponse and the team dialog here.
Reply
#7

Quote:
Originally Posted by [MP]Ditch
Посмотреть сообщение
3) I mean like, (dialog wise) once they press Login or Register it sends them another dialog straight away, I cannot get this right..
after they login/register on OnDialogResponse you put showplayerdialog..... so this is when they login (put it were players password is correct) it will be show it before they spawn and same for register you put after the register (press register after type they passwrod) you show that dialog you wont to be show

I can help you but you have to show me some code to make it that for you (your choise) but i told you basily what you have to do only left it to script it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)