Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Mr.nobOdy on Feb 20, 2019, 08:38 AM

Title: Need some codes!
Post by: Mr.nobOdy on Feb 20, 2019, 08:38 AM
I want to use some commands that are only useable with my nickname and other can't use it!
For example! I had the following command, i know i can set level or admin system but i did'nt want to do that. i just want that the following command is just available to my nickname.
else if ( cmd == "drown" )
{
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = FindPlayer( text );
                if ( plr )
 plr.Pos = Vector( -227.231, -545.897,5.56816);
Message( "[#7bb215]>> Admin  Mr.nobOdy has drown "+player.Name+" . " );
}
}
}
Title: Re: Need some codes!
Post by: Xhefri on Feb 20, 2019, 10:24 AM
if ( player.Name == "Nick"  )
else if ( cmd == "drown" )
{
if ( player.Name == "Nick"  )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = FindPlayer( text );
                if ( plr )
 plr.Pos = Vector( -227.231, -545.897,5.56816);
Message( "[#7bb215]>> Admin  Mr.nobOdy has drown "+player.Name+" . " );
}
}
 else MessagePlayer( "You are not allowed to use this command." , player );
}
Title: Re: Need some codes!
Post by: Mr.nobOdy on Feb 20, 2019, 01:02 PM
Quote from: Xhefri on Feb 20, 2019, 10:24 AMif ( player.Name == "Nick"  )
else if ( cmd == "drown" )
{
if ( player.Name == "Nick"  )
{
if ( !text ) MessagePlayer( "Syntax, /" + cmd + " <Nick/ID> <Reason>", player );
else {
local plr = FindPlayer( text );
                if ( plr )
 plr.Pos = Vector( -227.231, -545.897,5.56816);
Message( "[#7bb215]>> Admin  Mr.nobOdy has drown "+player.Name+" . " );
}
}
 else MessagePlayer( "You are not allowed to use this command." , player );
}
Thanks its working!