Liberty Unleashed

Scripting => Script Snippets => Topic started by: AlexTanase on October 26, 2012, 07:57:32 pm

Title: Command to fill a player armour [En español]
Post 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:

Code: [Select]
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.
Title: Re: Command to fill a player armour [En español]
Post by: Thijn on October 28, 2012, 10:33:10 am
I'm not sure why this is in script releases rather then on the wiki as an example.
Title: Re: Command to fill a player armour [En español]
Post by: IdkanYavuk X on October 30, 2012, 02:43:04 am
And this post should be on the "Script Snippets" section... As well as the other one