Hello guys, I always liked hydra so I made video of some stunts (maybe I make more soon)
I know some are very easy, but I hope you enjoy (sorry for shitty editing, I'm just a beginner).
Here I created player id for the scoreboard, I tested it and should work:
addEventHandler ( 'onClientResourceStart', resourceRoot,
function ( )
for i,v in ipairs ( getElementsByType ( 'player' ) ) do
setElementData ( v, 'data.playerID', i )
end
exports.scoreboard:scoreboardAddColumn ( 'data.playerID', 70, 'ID' )
end
)
function pest (sourcePlayer, command, who)
local targetPlayer = getPlayerFromName ( who )
if ( targetPlayer ) then
local x,y,z = getElementPosition (targetPlayer)
local xp,yp,zp = getElementRotation ( targetPlayer )
createObject ( 970, x+3, y+3, z, xp, yp, 0 )
end
end
addCommandHandler ( "pest", pest )
I know him he is my friend, he wanted to use the partial name for a player.. I didn't said you're code is wrong, on the contrary it's good.
Like for example: /warn Sol - (instead of Solidsnake14) which must be used with getPlayerFromName