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.