Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: ahmedzead on Jan 15, 2018, 06:31 PM

Title: what is wrong with this cmd???
Post by: ahmedzead on Jan 15, 2018, 06:31 PM
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
}
Title: Re: what is wrong with this cmd???
Post by: VK.Jona83Killer on Jan 15, 2018, 06:43 PM
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
   }
}
}
Title: Re: what is wrong with this cmd???
Post by: ahmedzead on Jan 15, 2018, 07:13 PM
didnt worked bro :(
Title: Re: what is wrong with this cmd???
Post by: Mohamed Boubekri on Jan 15, 2018, 07:16 PM
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.
Title: Re: what is wrong with this cmd???
Post by: ahmedzead on Jan 16, 2018, 09:06 AM
didnt worked too sorry :(
Title: Re: what is wrong with this cmd???
Post by: Mohamed Boubekri on Jan 16, 2018, 09:10 AM
Quote from: ahmedzead on Jan 16, 2018, 09:06 AMdidnt worked too sorry :(
You Are Using Account System Fuzzie Right ?
Title: Re: what is wrong with this cmd???
Post by: ahmedzead on Jan 16, 2018, 09:11 AM
yes bro
Title: Re: what is wrong with this cmd???
Post by: Mohamed Boubekri on Jan 16, 2018, 09:17 AM
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 ???
Title: Re: what is wrong with this cmd???
Post by: ahmedzead on Jan 16, 2018, 09:23 AM
it worked now thx guys :)
Title: Re: what is wrong with this cmd???
Post by: =RK=MarineForce on Jan 21, 2018, 07:51 PM
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 " + ")
}
}
Title: Re: what is wrong with this cmd???
Post by: Mohamed Boubekri on Jan 22, 2018, 09:39 AM
@=RK=MarineForce, Thi its Already Solved, What u Mean ???
Quote from: ahmedzead on Jan 16, 2018, 09:23 AMit worked now thx guys :)
Title: Re: what is wrong with this cmd???
Post by: =RK=MarineForce on Jan 25, 2018, 02:57 PM
LOL xd sorry