Jump to content

ejemplo de wiki


castaño

Recommended Posts

trato de hacer una función parecido a este ejemplo tomado de la wiki :

function showLocalHealth()

-- get the player's health and output it

local playerHealth = getElementHealth ( getLocalPlayer() )

outputChatBox ( "Your health: " .. playerHealth )

-- get the player's vehicle: if he is in one, output its health as well

local playerVehicle = getPedOccupiedVehicle ( getLocalPlayer() )

if playerVehicle then

local vehicleHealth = getElementHealth ( playerVehicle )

outputChatBox ( "Your vehicle's health: " .. vehicleHealth )

end

end

addCommandHandler ( "showhealth", showLocalHealth )

pero resulta que esta malo y no se porque (este es código que aparece en la wiki)

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...