can you tell me about admin rcon

Started by Spidey, Sep 11, 2015, 05:00 PM

Previous topic - Next topic

Spidey

can you tell me how to add rcon pass in 0.4
0.3 was /c rcon (pass)
gta vc and san are my favourite games

Mashreq

What do you mean by it? You mean to add a password for the command rcon?

Spidey

gta vc and san are my favourite games

Mashreq

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;
.

Thijn

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?

FinchDon

can i ask one thing ? how can i sent msg from console to server?
For any help and support Join #s-s at IRC for Help in Scripting
( For Newbies )

Debian

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

Xmair

#8
@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.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

KAKAN

:P this one is better, with the help of that Array(IsAdmin), we can make many cmds :P
oh no