Flow Posted February 28, 2018 Posted February 28, 2018 Hey there, i wanted to fill a interior with weed for a weed processor. My question is: How to place items? Is there a serverside command like in arma was or has this to be done in map editor itself? Second question: How to place an NPC to ineract with a menu? Thanks and regards
Captien Posted March 1, 2018 Posted March 1, 2018 Wiki is always your friendly search engine for functions you want. What you asking is how to create objects and peds ingame. You can create them in game without map editing Object Creating Peds Creating
Flow Posted March 5, 2018 Author Posted March 5, 2018 Object Creating is no problem but peds aren't created no matter what i trie with above given command. I want them just to stay there static doing nothing.
Captien Posted March 6, 2018 Posted March 6, 2018 let Ped = mp.peds.new(mp.game.joaat('MP_F_Freemode_01'), new mp.Vector3( 100.0, -100.0, 25.0), 270.0, (streamPed) => { // Ped Streamed streamPed.setAlpha(0); streamPed.freezePosition(true); }, player.dimension); 1 1
Flow Posted March 7, 2018 Author Posted March 7, 2018 Thanks for the example Captien. I tried without the freeze Position but the Ped never showed up. Will try this one
GreenFanta Posted March 7, 2018 Posted March 7, 2018 streamPed.setAlpha(255); This is instead of the 0 value.
Flow Posted March 7, 2018 Author Posted March 7, 2018 Thanks again Fanta. I guessed the Alpha was the problem. I also tried without the setAlpha command but still not worked. Does setAlpha(0) mean it is there but invisible then?
Flow Posted March 7, 2018 Author Posted March 7, 2018 (edited) Okay what i was trying is to create a ped on players position which did not work like doing so (i don't know why it is not working because it returns coords) const localPlayer = mp.players.local; let Ped = mp.peds.new(mp.game.joaat('ig_abigail'), new mp.Vector3(localPlayer.position.x, localPlayer.position.y, localPlayer.position.z), 270.0, (streamPed) => { // Ped Streamed streamPed.setAlpha(255); streamPed.freezePosition(true); }, 0); but using coords its working now: let Ped = mp.peds.new(mp.game.joaat('ig_abigail'), new mp.Vector3(429.6809387207031, -975.9828491210938, 30.710344314575195), 270.0, (streamPed) => { // Ped Streamed streamPed.setAlpha(255); streamPed.freezePosition(true); }, 0); Funfact: If you shoot the ped, the game crashes Edited March 7, 2018 by cmdflow 1
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