Enargy, Posted February 21, 2014 Posted February 21, 2014 Hello, I'm finishing a script said a ped, which tries to create a ped with a specific ID, but my question is. What is a table or to choose a specific number of skin ? For example: "/ped 1" = 240 or "/ped 2" = 217 pedCreated = function pedCreated(command) local x, y, z = getElementPosition(source) local pedModel = createPed(0, x, y + 5, z) end addCommandHandler("ped", pedCreated) - Inactivo.
cheez3d Posted February 21, 2014 Posted February 21, 2014 pedCreated = function (player,_,pedid) local x, y, z = getElementPosition(player) local pedModel = createPed(tonumber(pedid), x, y + 5, z) end addCommandHandler("ped", pedCreated) This is a server-side script. What it does is: it gets the id you specify when you use the command (example: /ped 23) and stores it in pedid as a string. Then it runs the function and creates a ped with the id you specified.
Moderators Citizen Posted February 21, 2014 Moderators Posted February 21, 2014 (edited) This ? (server-script) local skinList = { 240, -- 1 217 -- 2 } function pedCreated(thePlayer, cmd, skinNumber) local x, y, z = getElementPosition(thePlayer) local thePed = createPed(skinList[tonumber(skinNumber)] or 0, x, y + 5, z) end addCommandHandler("ped", pedCreated) Edited February 21, 2014 by Guest The rEvolution is coming ...
Anubhav Posted February 21, 2014 Posted February 21, 2014 No Citizen , He wants that he uses /ped skinID and he will get the skin. Any skin ID. Not only theese two. See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Moderators Citizen Posted February 21, 2014 Moderators Posted February 21, 2014 No Citizen , He wants that he uses /ped skinID and he will get the skin. Any skin ID. Not only theese two. For me, this: For example: "/ped 1" = 240 or "/ped 2" = 217 For me it means that he wants to spawn a ped with the skin id 240 when he writes /ped 1 etc. Of course he can add other skins to the list. The rEvolution is coming ...
Enargy, Posted February 21, 2014 Author Posted February 21, 2014 hmmm no, I'm trying to make is that with the command /ped 1 make the appearance of the Model 240 and the same command but with the number two /ped 2 make up another model. - Inactivo.
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