what is wrong with this cmd???

Started by ahmedzead, Jan 15, 2018, 06:31 PM

Previous topic - Next topic

ahmedzead

what is wrong with this cmd???
else if(cmd == "killplayer")
{
          if ( pstats[ player.ID ].Level < 10 ) return MessagePlayer( "[#ff0000][INFO][#ffffff] You Are Not Authorized To use This Command.", player);
else if ( !text ) return Message( "Usage: /"+cmd+" <player>" , player );
}
else
{
local plr = FindPlayer( text )
         if ( plr )
         plr.Health = 0
}

VK.Jona83Killer

here the fixed command:

else if(cmd == "killplayer")
{
          if ( pstats[ player.ID ].Level < 10 ) return MessagePlayer( "[#ff0000][INFO][#ffffff] You Are Not Authorized To use This Command.", player);
   else if ( !text ) return Message( "Usage: /"+cmd+" <player>" , player );
   {
   else
   {
   local plr = FindPlayer( text )
         if ( plr )
         plr.Health = 0
   }
}
}

ahmedzead


Mohamed Boubekri

#3
Try it:-( UnTested )
else if(cmd == "killplayer")
{
if ( pstats[ player.ID ].Level < 10 ) MessagePlayer( "[#ff0000][INFO][#ffffff] You Are Not Authorized To use This Command.", player);
else if ( !text ) MessagePlayer("/killplayer <Player>",player);
else {
local plr = FindPlayer(text);
if ( !plr ) MessagePlayer("Invalid Player",player);
else {
Message("Admin " +player.Name+ " Has Killed " +plr.Name+ "");
plr.Health = 0;
}
}
}

Update: Tested.
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].

ahmedzead


Mohamed Boubekri

Quote from: ahmedzead on Jan 16, 2018, 09:06 AMdidnt worked too sorry :(
You Are Using Account System Fuzzie Right ?
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].


Mohamed Boubekri

Quote from: Mohamed on Jan 15, 2018, 07:16 PMTry it:-( UnTested )
else if(cmd == "killplayer")
{
if ( pstats[ player.ID ].Level < 10 ) MessagePlayer( "[#ff0000][INFO][#ffffff] You Are Not Authorized To use This Command.", player);
else if ( !text ) MessagePlayer("/killplayer <Player>",player);
else {
local plr = FindPlayer(text);
if ( !plr ) MessagePlayer("Invalid Player",player);
else {
Message("Admin " +player.Name+ " Has Killed " +plr.Name+ "");
plr.Health = 0;
}
}
}

Update: Tested.
Mean i Have Tested That & its Working ???
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].

ahmedzead


=RK=MarineForce

untested

Try it

else if ( cmd == "kill")
{
local plr = FindPlayer( text);
if (!plr) MessagePlayer(" " + text + " is offline ", player);
if (!text) MessagePlayer(" kill [ID/NICK] ", player);
else{
plr.Health == 0;
Message(" Admin " + player.Name  + " is killed " + plr.Name " + ")
}
}

Mohamed Boubekri

| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].