Vice City: Multiplayer

Server Development => Scripting and Server Management => Script and Content Requests => Topic started by: UncleRus on Apr 20, 2020, 02:47 PM

Title: what command to be a admin on server
Post by: UncleRus on Apr 20, 2020, 02:47 PM
what command to be a admin server
Title: Re: what command to be a admin on server
Post by: Razor. on Apr 20, 2020, 04:51 PM
Here have one simple command to toogle your admin level, by me.

function onPlayerCommand( player, cmd, text )
{
if ( cmd == "admin" )
{
if ( player.IP != "127.0.0.1" /*<--- your ip here*/ ) MessagePlayer( "You don't have acess for this command.", player );
else if ( !text ) MessagePlayer( "[Sintax] Use: /admin <on/off>", player );
else if ( text == "on" )
{
if ( player.IsAdmin == true ) MessagePlayer( "You already have admin level.", player );
else
{
player.IsAdmin = true;
MessagePlayer( "Admin level enabled.", player );
}
}
else if ( text == "off" )
{
if ( player.IsAdmin == false ) MessagePlayer( "You already are without level.", player );
else
{
player.IsAdmin = false;
MessagePlayer( "Admin level disabled.", player );
}
}
else MessagePlayer( "Invalid option, use <on/off>", player );
}
}
[code]
Title: Re: what command to be a admin on server
Post by: UncleRus on Apr 20, 2020, 06:06 PM
console command!
Title: Re: what command to be a admin on server
Post by: Razor. on Apr 20, 2020, 11:31 PM
You can't execute a code from server console.
Title: Re: what command to be a admin on server
Post by: UncleRus on Apr 21, 2020, 06:01 AM
я точно не помню комманду ну она начиналась как то так level[0]set=2 или как то ёще я просто не помню
Title: Re: what command to be a admin on server
Post by: umar4911 on Apr 21, 2020, 09:30 AM
There are many ways to be an admin. I guess you're using class so you need to change the value of the respective element to be an admin like Stats[player.ID].Level = 6