Doongogar Posted September 1, 2021 Share Posted September 1, 2021 ola gostaria de saber como se faz um script que spawnaria um ped na minha coordenada, apenas dando um comando com o id do ped ex: /createped (id) Link to comment
Other Languages Moderators Lord Henry Posted September 1, 2021 Other Languages Moderators Share Posted September 1, 2021 createPed getElementPosition addCommandHandler Link to comment
eqFoxim Posted September 8, 2021 Share Posted September 8, 2021 function createped(player, cmd, iddoped) if ( tonumber(iddoped) ) then -- Verifico se o id digitado é um numero local x, y, z = getElementPosition(player) Ped = createPed(iddoped, x, y, z) end end addCommandHandler("criarped", createped) Assim ira funcionar. Você pode melhorar este codigo usando setElementFrozen ( deixar o ped imovel ) tambem pode melhorar bloqueando o dano dele fazendo um cancelEvent() no evento onPedDamage ( server-side ) onClientPedDamage ( client-side ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now