Need some codes!

Started by Mr.nobOdy, Feb 20, 2019, 08:38 AM

Previous topic - Next topic

Mr.nobOdy

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+" . " );
}
}
}

Xhefri

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 );
}

Mr.nobOdy

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!