SDMessage [Includes: Kick, Ban, BanEx, Reconnect, ToggleDialogMessage] -
Biesmen - 09.11.2011
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>
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
Re: SDMessage [Includes: Kick, Ban, BanEx, Reconnect, ToggleDialogMessage] -
Lookin - 09.11.2011
Very Nice I Love It!
BTW 1st =D
Re: SDMessage [Includes: Kick, Ban, BanEx, Reconnect, ToggleDialogMessage] -
TheArcher - 09.11.2011
Quote:
If you do not want to give a reason, replace it with this: Kick(playerid, "");
|
Instead of replacing with "" if you don't have a reason you can check if the string is empity so you will use only Kick(playerid);
But anyways good job.
Re: SDMessage [Includes: Kick, Ban, BanEx, Reconnect, ToggleDialogMessage] -
Biesmen - 09.11.2011
Quote:
Originally Posted by TheArcher
Instead of replacing with "" if you don't have a reason you can check if the string is empity so you will use only Kick(playerid);
|
There are still some couple of things I have to learn, and that's one of them. I am trying to get that working for a long time, but never managed to. However, now I've got the time, I will add this in version 2.0 for sure.
Re: SDMessage [Includes: Kick, Ban, BanEx, Reconnect, ToggleDialogMessage] -
KoczkaHUN - 09.11.2011
Just replace
pawn Код:
KickEx(playerid, reason[])
with
pawn Код:
KickEx(playerid, reason[]="")
, and you won't break current scripts.
Re: SDMessage [Includes: Kick, Ban, BanEx, Reconnect, ToggleDialogMessage] -
Biesmen - 10.11.2011
Quote:
Originally Posted by KoczkaHUN
Just replace
pawn Код:
KickEx(playerid, reason[])
with
pawn Код:
KickEx(playerid, reason[]="")
, and you won't break current scripts.
|
Thank you very much, I'll update the script right now.
Re: SDMessage [Includes: Kick, Ban, BanEx, Reconnect, ToggleDialogMessage] -
Xx_OutLawZ_xX - 10.11.2011
Nicee
Re: SDMessage [Includes: Kick, Ban, BanEx, Reconnect, ToggleDialogMessage] -
Biesmen - 10.11.2011
Version 1.1 released, if you have 1.0, replace it.
Adds in 1.1
Kick and BanEx is now compatible with every script. You do not have to change your script anymore if you do not want to give a Kick reason, or if you do not want to enter a name at BanEx.
(Thanks to KoczkaHUN)
Re: SDMessage [Includes: Kick, Ban, BanEx, Reconnect, ToggleDialogMessage] -
[LaTinb0y]...$ag3R - 10.11.2011
nice wwork...i'm lov'in it..keep it up dude...exellant !
Re: SDMessage [Includes: Kick, Ban, BanEx, Reconnect, ToggleDialogMessage] -
Swiftyy - 03.11.2013
How do I install this because when I add #include <SDMessage> to my gamemode and the file to /pawno/include it says: 'Cannot read from file: SDMessage.inc '