can you tell me how to add rcon pass in 0.4
0.3 was /c rcon (pass)
What do you mean by it? You mean to add a password for the command rcon?
yes
You can use this one:
else if ( cmd == "rcon" )
{
if ( !text ) MessagePlayer( "Syntax - /rcon <password>", player );
else
{
local rcon_pass = "hiddenpassword"; //change to the password which you need.
if ( text == rcon_pass ) MessagePlayer( "You have successfully logged into rcon.", player );
else MessagePlayer( "You have failed to login in rcon.", player );
}
}
I suppose you're required to implement the authentication manually and then use player.Admin = true;
There's no rcon in 0.4
And the command you said is a /c command which means it was done with scripts. Why not re-create it then?
can i ask one thing ? how can i sent msg from console to server?
Quote from: FinchDon on Sep 12, 2015, 01:05 AMcan i ask one thing ? how can i sent msg from console to server?
No make your own plugin or use this http://forum.vc-mp.org/?topic=387.0
@FinchDon , Download the plugin made by ysc (cmdinput) and paste this in your functions.
function onConsoleInput( cmd, text)
{
try {
local cmd = cmd.tolower();
if ( cmd == "chat" )
{
if ( !text) print(cmd " 'Text'");
else
{
Message("[#00ff00]Console admin [#ffffff]: " text)
print(text " was sent to all players");
}
}
else print("No cmd exists with " cmd);
}
catch(e) print("OnConsoleInput error : " e);
}
I didn't tested it because, I am on my mobile.REMEMBER TO ADD PLUS BECAUSE MY MOBILE IS FUCKING CORRUPTED A BIT AND IT DOESNT WRITES A PLUS
@Spidey , Try this.
else if ( cmd == "c")
{
if ( !text) PrivMessage( player,"/c [Command]")
else if ( text == "admin")
{
//Credits to mashreq.
local rcon_pass ="hiddenpassword"; //change to the password which you need.
if ( text == rcon_pass )
{
MessagePlayer( "You have successfully logged into rcon.", player );
IsAdmin[player.ID]=true;
}
else
{
MessagePlayer( "You have failed to login in rcon.", player );
player.Kick();
}
}
}
}
function OnScriptLoad();
{
IsAdmin <- array(GetMaxPlayers(),false);
}
Same with this, didn't tested.
:P this one is better, with the help of that Array(IsAdmin), we can make many cmds :P