Jump to content

2 Questions


Ralf122

Recommended Posts

I wanted to make peds in my own server, so i went to coommunity and searched for a good script to make peds, but these script didn't work and some other script were for peds who are walking, and i don't need that. I only want to make Peds who're doing nothing. so i thought maybe some of you does have a easy script to make peds.

Second question.

All the cars dissapear after a little time, and i don't want it so i tried to change it in freeroam resource. but i can't stop it. so is there a script for this problem?

Sorry for my bad english!

Link to comment

Im sure this works, but im new to scripting and not totally sure, I ussually look it up before posting, but here it is off the top of my head...

function createPed() 
createPed(123,3432,7989,8965, 190) 
end 
addEventHandler("onResourceStart", getElementRoot(), createPed) 

Lol... sorry if thats wrong, im not sure.

Link to comment

this should do what you want

function createPeds ( player, cmd, skin, weaponID, ammo ) 
local x, y, z = getElementPosition( player ) 
ped = createPed(skin, x, y, z) 
giveWeapon ( ped, weaponID, ammo, true ) 
end 
addCommandHandler ( "ped", createPeds ) 

Link to comment

function createPeds ( player, cmd, 165, 31, 0 ) 
local 1710.4483642578, -2597.6245117188, 13.546875 = getElementPosition( player ) 
ped = createPed(skin 165, 1710.4483642578, -2597.6245117188, 13.546875) 
giveWeapon ( ped, 31, 0, true ) 
end 
addCommandHandler ( "ped", createPeds ) 

did i do something wrong?

Link to comment
function createPeds ( player, cmd, 165, 31, 0 ) 
local 1710.4483642578, -2597.6245117188, 13.546875 = getElementPosition( player ) 
ped = createPed(skin 165, 1710.4483642578, -2597.6245117188, 13.546875) 
giveWeapon ( ped, 31, 0, true ) 
end 
addCommandHandler ( "ped", createPeds ) 

did i do something wrong?

wtf is this?

just use this

function createPeds ( player, cmd, skin, weaponID, ammo ) 
local x, y, z = getElementPosition( player ) 
ped = createPed(skin, x, y, z) 
giveWeapon ( ped, weaponID, ammo, true ) 
end 
addCommandHandler ( "ped", createPeds ) 

to use the command type in F8: ped 165 31 9999

you will see a ped near you with skin 165 and with weapon m4 and with ammo 9999

Link to comment
function createPeds() 
ped = createPed(165, 1710.4483642578, -2597.6245117188, 13.546875) 
giveWeapon ( ped, 31, 9999, true ) 
end 
addEventHandler("onResourceStart",resourceRoot, createPeds) 

EDIT: I fixed the code now should work

Edited by Guest
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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