Ralf122 Posted September 28, 2011 Posted September 28, 2011 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!
MatXpl Posted September 28, 2011 Posted September 28, 2011 1. https://wiki.multitheftauto.com/wiki/CreatePed
Xeno Posted September 28, 2011 Posted September 28, 2011 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.
Ralf122 Posted September 29, 2011 Author Posted September 29, 2011 I want to give them weapons and stuff, but i think it's very difficult. could some one of you explain it?
Cadu12 Posted September 29, 2011 Posted September 29, 2011 giveWeapon giveWeaponAmmo setWeaponAmmo takeAllWeapons takeWeapon takeWeaponAmmo
TAPL Posted September 29, 2011 Posted September 29, 2011 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 )
CapY Posted September 29, 2011 Posted September 29, 2011 Put it in the server side. Edit: lol , same time post.
Ralf122 Posted September 29, 2011 Author Posted September 29, 2011 How can i make it Client side? just the same?
Cadu12 Posted September 29, 2011 Posted September 29, 2011 (edited) COLOR YELLOW is server-side COLOR RED is client-side COLOR BLUE is both Edit: Just look it in wiki mtasa. Edited September 29, 2011 by Guest
BinSlayer1 Posted September 29, 2011 Posted September 29, 2011 clientside: function createPeds ( cmd, skin, weaponID, ammo ) local x, y, z = getElementPosition( getLocalPlayer() ) ped = createPed(tonumber(skin), x, y, z) giveWeapon ( ped, tonumber(weaponID), tonumber(ammo), true ) end addCommandHandler ( "ped", createPeds )
Ralf122 Posted September 29, 2011 Author Posted September 29, 2011 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?
BinSlayer1 Posted September 29, 2011 Posted September 29, 2011 Ralf122 there's no easy way of making it clientside as giveWeapon is apparently serverside only why can't you use serverside script?
TAPL Posted September 29, 2011 Posted September 29, 2011 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
Ralf122 Posted September 29, 2011 Author Posted September 29, 2011 i just want a ped on one place with a weapon. i doesn't have to do something. a friend of mine has had a serve,. and started a script. when the script started two peds with a weapon appeared. he didn't wrote something in F8. i just wanted the same.
TAPL Posted September 29, 2011 Posted September 29, 2011 function createPeds() ped = createPed(165, 1710.4483642578, -2597.6245117188, 13.546875) giveWeapon ( ped, 31, 9999, true ) end addEventHandler("onResourceStart", getElementRoot(), createPeds)
Ralf122 Posted September 29, 2011 Author Posted September 29, 2011 this is really weird, the ped does not appear
TAPL Posted September 29, 2011 Posted September 29, 2011 (edited) 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 September 29, 2011 by Guest
Ralf122 Posted September 29, 2011 Author Posted September 29, 2011 This is my meta i will check the coordinates
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