Liberty Unleashed
Scripting => Script Releases => Topic started by: Merkel on June 13, 2013, 07:04:10 pm
-
Public Commands with ! from Vice City Multiplayer
I like VCMP and I created a script with ! for Fans of Vice city (xD)
Download:
http://adf.ly/QTU9i (http://adf.ly/QTU9i)
Errors:
In the Console say: "ERROR WRONG NUMBER OF PARAMETERS"
And work! L0L
-
LMAO ;D
Same code is included in VCMP Squirrel Server. You've just renamed command function.
-
Why are you releasing something if it has errors?
-
For cmds with ! use this:
function onPlayerChat( player, text )
{
local backupText = text;
local firstChar = backupText.slice( 0, 1 );
if ( firstChar == "!" )
{
// The following function makes any ! commands go to the OnPlayerCommand handler
local splittext = text.slice( 1 );
local params = split( splittext, " " );
if ( params.len() == 1 ) onPlayerCommand( player, params[ 0 ], "" );
else
{
splittext = splittext.slice( splittext.find( " " ) + 1 );
onPlayerCommand( player, params[ 0 ], splittext );
}
}
}
function onPlayerCommand(player, cmd, text)
{
// Your cmds here
}