Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: ForOver on Dec 22, 2017, 12:41 PM

Title: how to add this "unknown command"
Post by: ForOver on Dec 22, 2017, 12:41 PM
guys! anyone know how to add this? example if i type a invalid command, the server will say "unknown command"
i want this! anyone can giving me a example? :(
note: @Mohamed @=RK=MarineForce do not help me if u can't understand that i say
Title: Re: how to add this "unknown command"
Post by: Retard on Dec 22, 2017, 02:01 PM
Add this in the end of your script

{
else MessagePlayer( "Invalid Command",player );
}
Title: Re: how to add this "unknown command"
Post by: =RK=MarineForce on Dec 22, 2017, 02:23 PM
{
else MessagePlayer( " [#FF0000] Invalid Command Do /commands",player );
}
Title: Re: how to add this "unknown command"
Post by: umar4911 on Dec 22, 2017, 02:29 PM
These are the best parameters for the onPlayerCommand

function onPlayerCommand(player, command, arguments)
{
local cmd, text;
cmd = command.tolower();
text = arguments;
local params;


// your cmds here


else MessagePlayer("Unknown Command", player);
}
Title: Re: how to add this "unknown command"
Post by: Retard on Dec 22, 2017, 02:47 PM
Quote from: =RK=MarineForce on Dec 22, 2017, 02:23 PM{
else MessagePlayer( " [#FF0000] Invalid Command Do /commands",player );
}
You Copied Mine and just changed the text lol
Title: Re: how to add this "unknown command"
Post by: ! on Dec 22, 2017, 03:46 PM
Quote from: [VF]4L14HM3D on Dec 22, 2017, 02:47 PM
Quote from: =RK=MarineForce on Dec 22, 2017, 02:23 PM{
else MessagePlayer( " [#FF0000] Invalid Command Do /commands",player );
}
You Copied Mine and just changed the text lol
And you copied from already available scripts but didn't bother to give credits or at least the topic link.
Title: Re: how to add this "unknown command"
Post by: Retard on Dec 22, 2017, 06:06 PM
Quote from: ! on Dec 22, 2017, 03:46 PM
Quote from: [VF]4L14HM3D on Dec 22, 2017, 02:47 PM
Quote from: =RK=MarineForce on Dec 22, 2017, 02:23 PM{
else MessagePlayer( " [#FF0000] Invalid Command Do /commands",player );
}
You Copied Mine and just changed the text lol
And you copied from already available scripts but didn't bother to give credits or at least the topic link.
I wrote it my self.I agree about the admin system but this i wrote my self
Title: Re: how to add this "unknown command"
Post by: Zone_Killer on Dec 23, 2017, 11:01 AM
try this:
if(cmd == "5") MessagePlayer("unknown command",player);
Title: Re: how to add this "unknown command"
Post by: Retard on Dec 23, 2017, 11:38 AM
Quote from: Zone_Killer on Dec 23, 2017, 11:01 AMtry this:
if(cmd == "5") MessagePlayer("unknown command",player);
Now that's great !
Title: Re: how to add this "unknown command"
Post by: Zone_Killer on Dec 23, 2017, 12:40 PM
he has edited this topic. Before that he wrote /5
Title: Re: how to add this "unknown command"
Post by: Retard on Dec 23, 2017, 01:06 PM
Quote from: Zone_Killer on Dec 23, 2017, 12:40 PMhe has edited this topic. Before that he wrote /5
ooo. ok
Title: Re: how to add this "unknown command"
Post by: =RK=MarineForce on Dec 23, 2017, 09:08 PM
Just check

else MessagePlayer( " [#FF0000] Invalid Command Do /commands",player );  fixed me : help by ALIAHMED

this is error

{
else MessagePlayer( " [#FF0000] Invalid Command Do /commands",player );
}
Title: Re: how to add this "unknown command"
Post by: umar4911 on Dec 24, 2017, 04:26 AM
Quote from: =RK=MarineForce on Dec 23, 2017, 09:08 PMJust check

else MessagePlayer( " [#FF0000] Invalid Command Do /commands",player );  fixed me : help by ALIAHMED

this is error

{
else MessagePlayer( " [#FF0000] Invalid Command Do /commands",player );
}
Can you use code
Title: Re: how to add this "unknown command"
Post by: ! on Dec 24, 2017, 02:40 PM
Quote from: umar4911 on Dec 22, 2017, 02:29 PMThese are the best parameters for the onPlayerCommand

function onPlayerCommand(player, command, arguments)
{
local cmd, text;
cmd = command.tolower();
text = arguments;
local params;


// your cmds here


else MessagePlayer("Unknown Command", player);
}
This was something helpfull for topic starter now stop posting at least read the posts and read the topic carefully before posting.