Lloyd Logan Posted August 16, 2012 Posted August 16, 2012 Whats up with this. frustrating me, it should be so simple to fix it! Unexpected symbol near .. that is line 3 function pedLoad ( name ) local x, y, z = getElementPosition(thePlayer) createPed (120, .. x .., .. y .., .. z,) outputChatBox("Successful!", thePlayer, 255, 0, 0) end addEventHandler ( "createped", pedLoad )
Xeno Posted August 16, 2012 Posted August 16, 2012 I had this problem yesterday, change the command. And no joke, I actually made this yeterday: function pedcreation(player) local x,y,z = getElementPosition(player) local xr,xy,xz = getElementRotation(player) peds = createPed(288,x,y,z-1,xr,xy,xz) setElementRotation(peds, xr,xy,xz) end addCommandHandler("piepie",pedcreation) But, its because createped is a function name, so you can't use it as a command. Oh, and thePlayer is not in the function ( ) ' s
ernst Posted August 16, 2012 Posted August 16, 2012 addCommandHandler("piepie", function(client) local x, y, z = getElementPosition(client) local rotx, roty, rotz = getElementRotation(client) local ped = createPed(288, x, y, z, rotz) if (ped) then outputChatBox("Successful!",client, 255, 0, 0) end end)
Lloyd Logan Posted August 16, 2012 Author Posted August 16, 2012 I had this problem yesterday, change the command.And no joke, I actually made this yeterday: function pedcreation(player) local x,y,z = getElementPosition(player) local xr,xy,xz = getElementRotation(player) peds = createPed(288,x,y,z-1,xr,xy,xz) setElementRotation(peds, xr,xy,xz) end addCommandHandler("piepie",pedcreation) But, its because createped is a function name, so you can't use it as a command. Oh, and thePlayer is not in the function ( ) ' s Haha, thanks alot, and does anyone know how to be able to choose the skin?
AMARANT Posted August 16, 2012 Posted August 16, 2012 and does anyone know how to be able to choose the skin? setPedSkin(player,skinid)
Lloyd Logan Posted August 16, 2012 Author Posted August 16, 2012 and does anyone know how to be able to choose the skin? setPedSkin(player,skinid) And how do i put this into the script, Thanks for your help!
AMARANT Posted August 16, 2012 Posted August 16, 2012 Just put it where you need specifying required arguments. function pedcreation(player) local x,y,z = getElementPosition(player) local xr,xy,xz = getElementRotation(player) peds = createPed(288,x,y,z-1,xr,xy,xz) setElementRotation(peds, xr,xy,xz) setPedSkin(peds,50) -- This sets ped skin to 50 (mechanic skin) end addCommandHandler("piepie",pedcreation)
Lloyd Logan Posted August 16, 2012 Author Posted August 16, 2012 Just put it where you need specifying required arguments. function pedcreation(player) local x,y,z = getElementPosition(player) local xr,xy,xz = getElementRotation(player) peds = createPed(288,x,y,z-1,xr,xy,xz) setElementRotation(peds, xr,xy,xz) setPedSkin(peds,50) -- This sets ped skin to 50 (mechanic skin) end addCommandHandler("piepie",pedcreation) How do i choose, if you know what i mean, like, /piepie (skinid)
Castillo Posted August 16, 2012 Posted August 16, 2012 function pedcreation ( player, cmd, skin ) local x, y, z = getElementPosition ( player ) local rot = getPedRotation ( player ) peds = createPed ( tonumber ( skin ) or 0, x, y, z - 1 , rot ) end addCommandHandler ( "piepie", pedcreation ) setPedSkin is outdated btw.
ernst Posted August 16, 2012 Posted August 16, 2012 Just put it where you need specifying required arguments. function pedcreation(player) local x,y,z = getElementPosition(player) local xr,xy,xz = getElementRotation(player) peds = createPed(288,x,y,z-1,xr,xy,xz) setElementRotation(peds, xr,xy,xz) setPedSkin(peds,50) -- This sets ped skin to 50 (mechanic skin) end addCommandHandler("piepie",pedcreation) How do i choose, if you know what i mean, like, /piepie (skinid) function pedcreation (client, cmd, skinid) if not (skinid) then outputChatBox("Usage: /piepie skinid", client, 250, 0, 0) return end local x, y, z = getElementPosition(client) local rotx, roty, rotz = getElementRotation(client) createPed(skinid, x, y, z, rotz) end addCommandHandler("piepie", pedcreation)
Lloyd Logan Posted August 16, 2012 Author Posted August 16, 2012 function pedcreation ( player, cmd, skin ) local x, y, z = getElementPosition ( player ) local rot = getPedRotation ( player ) peds = createPed ( tonumber ( skin ) or 0, x, y, z - 1 , rot ) end addCommandHandler ( "piepie", pedcreation ) setPedSkin is outdated btw. I love you!!!! But thanks everyone else!!
Lloyd Logan Posted August 16, 2012 Author Posted August 16, 2012 function pedcreation ( player, cmd, skin ) local x, y, z = getElementPosition ( player ) local rot = getPedRotation ( player ) peds = createPed ( tonumber ( skin ) or 0, x, y, z - 1 , rot ) end addCommandHandler ( "piepie", pedcreation ) setPedSkin is outdated btw. Maybe i am pushing this a bit far, but how to make them walk?
ernst Posted August 16, 2012 Posted August 16, 2012 function pedcreation ( player, cmd, skin ) local x, y, z = getElementPosition ( player ) local rot = getPedRotation ( player ) peds = createPed ( tonumber ( skin ) or 0, x, y, z - 1 , rot ) setPedAnimation(peds, "ped", "WOMAN_walknorm") end addCommandHandler ( "piepie", pedcreation )
Lloyd Logan Posted August 16, 2012 Author Posted August 16, 2012 function pedcreation ( player, cmd, skin ) local x, y, z = getElementPosition ( player ) local rot = getPedRotation ( player ) peds = createPed ( tonumber ( skin ) or 0, x, y, z - 1 , rot ) setPedAnimation(peds, "ped", "WOMAN_walknorm") end addCommandHandler ( "piepie", pedcreation ) Thank you so much!
Lloyd Logan Posted August 16, 2012 Author Posted August 16, 2012 I dont think this is possible but can you get a ped to fight back?
MTA Team qaisjp Posted August 16, 2012 MTA Team Posted August 16, 2012 (edited) slothbot Edited August 16, 2012 by Guest
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