Liberty Unleashed
Scripting => Script Help => Topic started by: Mido_Pop on September 05, 2012, 01:07:28 pm
-
function onPlayerCommand( id, cmd, text )
{
if ( cmd == "unloadRace" )
{
UnloadScript( "Race" );
Message( "Race Script unloaded!" );
}
return 1;
}
i need to make command unload any script .
-
This should do the trick (although it's untested on my part). Remember, this command would now be "/unload" instead of "/unloadrace"
function onPlayerCommand( player, command, params )
{
if ( command == "unload" )
{
if( params )
{
if( UnloadScript( params ) )
{
Message( params " script unloaded!" );
}
else
{
Message( params " script could not be unloaded!" );
}
}
else
{
MessagePlayer( "Syntax: /unload <scriptname>", player );
}
}
return 1;
}
-
Man When i Type /unload <script> server close why ? :'(
-
Did you unload the script that has the "/unload" command in it?
-
LOL no .