19.02.2013, 00:52
pawn Code:
CMD:lockserver(playerid, params[])
{
if(!IsPlayerAdmin(playerid))
return 1;
if(isnull(params))
return SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /lockserver [password]");
if(strlen(params) < 5 || strlen(params) > 30)
return SendClientMessage(playerid, COLOR_RED, "ERROR: The password must be between 5 and 30 characters.");
new
szString[128]
;
format(szString, sizeof(szString), "You have set the server password to: %s", params);
SendClientMessage(playerid, COLOR_LIGHTBLUE, szString);
format(szString, sizeof(szString), "password %s", params);
SendRconCommand(szString);
return 1;
}