Author Topic: Command to fill a player armour [En español]  (Read 2200 times)

AlexTanase

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Command to fill a player armour [En español]
« on: October 26, 2012, 08: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.

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: Command to fill a player armour [En español]
« Reply #1 on: October 28, 2012, 11:33:10 am »
I'm not sure why this is in script releases rather then on the wiki as an example.

IdkanYavuk X

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +37/-36
  • Developer for The Newport Experience
    • View Profile
Re: Command to fill a player armour [En español]
« Reply #2 on: October 30, 2012, 03:43:04 am »
And this post should be on the "Script Snippets" section... As well as the other one
« Last Edit: December 08, 2012, 10:42:34 pm by IdkanYavuk »

 

© Liberty Unleashed Team.