This topic was marked solved by its starter, on February 20th, 01:02 PM

Mr.nobOdy

  • Newbie
  • Posts: 26
Need some codes!
«  »Last edited
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

  • Newbie
  • Posts: 34
Re: Need some codes!
« Reply #1,  »
Code: [Select]
if ( player.Name == "Nick"  )

Code: [Select]
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

  • Newbie
  • Posts: 26
Re: Need some codes!
« Reply #2,  »
Quote from Xhefri on February 20th, 10:24 AM
Code: [Select]
if ( player.Name == "Nick"  )

Code: [Select]
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!