Liberty Unleashed
Scripting => Script Snippets => Topic started by: AlexTanase on October 26, 2012, 07:57:32 pm
-
To add this command to your server you have to enter the folder server/scripts/Main/[Files] and open the file with WordPad main.nut or something.
After the function onPlayerCommand add this command:
if ( szCmd == "darchaleco" )
{
if ( !szParams ) MessagePlayer( "[Error] Utiliza: /DarChaleco [id/player]", pPlayer );
else
{
local pTemp = split( szParams, " " ), p = GetPlayer( pTemp[ 0 ] );
if ( p )
{
if ( p.Spawned )
{
p.Armour = 100;
MessagePlayer("El jugador " + p.Name + " ha recibido " + p.Armour + " de chaleco.", pPlayer );
}
else MessagePlayer( "Esta persona no se genera nub!", pPlayer );
}
else MessagePlayer( "No se ha podido encontrar a nadie con ese id / nick", pPlayer );
}
}
Hope you like. A greeting to all.
-
I'm not sure why this is in script releases rather then on the wiki as an example.
-
And this post should be on the "Script Snippets" section... As well as the other one