SA-MP Forums Archive
[FilterScript] Simple Server Lock System For Admins - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Simple Server Lock System For Admins (/showthread.php?tid=480733)



Simple Server Lock System For Admins - HoboGamings - 12.12.2013

The simple script lets you lock your server for reasons you can control, so if you had a bug you may leave this how it is, if you wanted it to updated just copy this and paste it again but change the "CMD:lockserver" to something as simple as "CMD:updatelock" Leave a rep

(My server uses a custom made admin system you may need to change this to your admin system)

(This uses zcmd)

Код:
new bool:ServerLocked;

CMD:lockserver(playerid, params[])

{
	new string[128];
	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    if(ServerLocked)
    {
        ServerLocked = false;
        SendRconCommand("password 0");
		SendRconCommand("hostname Ready to Roleplay [Hosted Tab][Refund]");
		format(string, sizeof(string), "{FF0000}[Admin]{FF6347} Owner %s unlocked the server.", NORPN(playerid));
		SendClientMessageToAll(COLOR_WHITE, string);
    }
    else
    {
        ServerLocked = true;
        SendRconCommand("password locked");
    	SendRconCommand("hostname Ready to Roleplay [Maintenance]");
		format(string, sizeof(string), "{FF0000}[Admin]{FF6347} Owner %s locked the server.", NORPN(playerid));
		SendClientMessageToAll(COLOR_WHITE, string);
    }
    return 1;
}



Re: Simple Server Lock System For Admins - FahadKing07 - 12.12.2013

Nice one


Re: Simple Server Lock System For Admins - HoboGamings - 20.12.2013

Quote:
Originally Posted by FahadKing07
Посмотреть сообщение
Nice one
Thanks mate!


Re: Simple Server Lock System For Admins - Alphlax - 20.12.2013

Good script mate


Re: Simple Server Lock System For Admins - Gen3i - 20.12.2013

Niceee


Re: Simple Server Lock System For Admins - MBilal - 21.12.2013

Nice But i get this
error 017: undefined symbol "NORPN"


Re: Simple Server Lock System For Admins - J4mmyHD - 21.12.2013

Nice


Re: Simple Server Lock System For Admins - FoxGaming - 21.12.2013

Nice... keep it up!