Ralf122 Posted September 28, 2011 Share 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! Link to comment
MatXpl Posted September 28, 2011 Share Posted September 28, 2011 1. https://wiki.multitheftauto.com/wiki/CreatePed Link to comment
Xeno Posted September 28, 2011 Share 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. Link to comment
Ralf122 Posted September 29, 2011 Author Share 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? Link to comment
Cadu12 Posted September 29, 2011 Share Posted September 29, 2011 giveWeapon giveWeaponAmmo setWeaponAmmo takeAllWeapons takeWeapon takeWeaponAmmo Link to comment
TAPL Posted September 29, 2011 Share 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 ) Link to comment
Ralf122 Posted September 29, 2011 Author Share Posted September 29, 2011 is this also client? Link to comment
CapY Posted September 29, 2011 Share Posted September 29, 2011 Put it in the server side. Edit: lol , same time post. Link to comment
Ralf122 Posted September 29, 2011 Author Share Posted September 29, 2011 How can i make it Client side? just the same? Link to comment
Cadu12 Posted September 29, 2011 Share 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 Link to comment
BinSlayer1 Posted September 29, 2011 Share 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 ) Link to comment
TAPL Posted September 29, 2011 Share Posted September 29, 2011 giveWeapon is only Server side Oo Link to comment
CapY Posted September 29, 2011 Share Posted September 29, 2011 Make a custom event and trigger it . Link to comment
TAPL Posted September 29, 2011 Share Posted September 29, 2011 createPed from client side is Synced ? Link to comment
Ralf122 Posted September 29, 2011 Author Share Posted September 29, 2011 i don't see a ped now Link to comment
Ralf122 Posted September 29, 2011 Author Share 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? Link to comment
BinSlayer1 Posted September 29, 2011 Share 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? Link to comment
TAPL Posted September 29, 2011 Share 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 Link to comment
Ralf122 Posted September 29, 2011 Author Share 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. Link to comment
TAPL Posted September 29, 2011 Share 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) Link to comment
Ralf122 Posted September 29, 2011 Author Share Posted September 29, 2011 this is really weird, the ped does not appear Link to comment
TAPL Posted September 29, 2011 Share 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 Link to comment
Ralf122 Posted September 29, 2011 Author Share Posted September 29, 2011 This is my meta i will check the coordinates Link to comment
Ralf122 Posted September 29, 2011 Author Share Posted September 29, 2011 coordinates are good so the meta? 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