[Include] SDMessage [Includes: Kick, Ban, BanEx, Reconnect, ToggleDialogMessage]
#1

SDMessage include 1.1
Created by:
Biesmen


About
I was bored at my 'school' and I thought of creating something which looks nice, but is pretty useless. It's just something for the layout of the server. This includes sends a normal dialog to players who get Kicked, Banned or forced to reconnect. If a player gets kicked, it will send this dialog: "You've been kicked by the server", however you can give a reason by using this code: "Kick(playerid, "Insulting");". It will send this dialog: "You've been kicked by the server for: Insulting". I've also included a reconnect function, which is scripted by me and thought by JernejL.

Functions:
pawn Код:
Kick(playerid, reason); // If you do not want to give a reason, you can use the normal Kick(playerid); !
Ban(playerid); // Normal ban, not changed, it only sends a dialog message.
BanEx(playerid, reason, name); // Normal BanEx. If you do not want to enter the name of the admin, you can just use BanEx(playerid, reason);
Reconnect(playerid, reason); // Same as above. It will send "You've got forced to reconnect by the server" if you do not enter a reason. Use Reconnect(playerid); if you do not want to give a reason.
ToggleDialogMessage(type, bool:true/false); // This function will disable the dialog message for the chosen type. Existing types: Kick, Ban, BanEx, Reconnect
How-to-use
Copy the pastebin link at the "Download" section, open notepad, paste the script and save it as "SDMessage.inc" in your /pawno/include folder. Enter this at the top of your script, below #include <a_samp>
pawn Код:
#include <SDMessage>
Download
Pastebin Version: 1.1 - NEW
Pastebin Version: 1.0
No mirrors allowed

Known bugs
-

Credits
  • Biesmen
  • JernejL - Reconnect method
  • KoczkaHUN - The method to make the functions work without modifying your script.
Feedback and critism allowed.
Enjoy
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)