meta.xml well done but will not turn on the script. What wrong have I done? I give what I have written in .lua :
function pushim (thePlayer, commandName, ...)
player = findPlayer(...)
if not player then
outputChatBox("* /push: player not found", thePlayer)
elseif isPedInVehicle(player) then
local vehicle = getPedOccupiedVehicle(player)
x,y,z = getElementVelocity(vehicle)
setElementVelocity ( vehicle, x, y, z+0.30)
outputChatBox( getPlayerName(thePlayer).. " Push " ..getPlayerName(player), getRootElement(), 255, 255, 0, true)
end
end
addCommandHandler("push", pushim)
function findPlayer(namepart)
for i, player in ipairs(getElementsByType("player")) do
local name = getPlayerName(player)
if string.find(name:lower(), namepart:lower(), 1, true) then
return player, name
end
end
return false
end
Edit: as part of the console, push start, writes: Resource could not be found, what I did wrong!