darbka2002 Posted April 14, 2016 Share Posted April 14, 2016 (edited) h Edited April 21, 2016 by Guest Link to comment
Captain Cody Posted April 14, 2016 Share Posted April 14, 2016 I need to whole table so that the values can actually be defined correctly. Link to comment
darbka2002 Posted April 17, 2016 Author Share Posted April 17, 2016 (edited) plz help Edited April 21, 2016 by Guest Link to comment
Captain Cody Posted April 17, 2016 Share Posted April 17, 2016 pjs = { { car = 562, texture= "elegyrasta.png", shader= "texture.fx", num = 1, worldname = "elegy1body256", friendname = "Rasta Paintjob", owner = "darbka2002" }, { car = 560, texture= "mah.png", shader= "texture.fx", num = 1, worldname = "sultan2body256", friendname = "Sultan Paintjob", owner = "mahmoudembaby", pj = 2 }, } addEvent("paintjob.SonApplyToAllServer", true ) function applyitdude(val, player) triggerClientEvent(root, "paintjob.onApplyToAllServer", root, val, player) end addEventHandler("paintjob.SonApplyToAllServer", root, applyitdude) addEvent("paintjob.SunApplyToAllServer", true ) function unapplyitdude(val, player) triggerClientEvent(root, "paintjob.unApplyToAllServer", root, val, player) end addEventHandler("paintjob.SunApplyToAllServer", root, unapplyitdude) function setpaintjob(plr,cmd,number) if number then for ind,val in ipairs(pjs) do local pf = val.car..val.num if getPedOccupiedVehicle(plr) and pf == getElementModel(getPedOccupiedVehicle(plr)..number and getElementModel(getPedOccupiedVehicle(plr)) == val.car and getAccountName(getPlayerAccount(plr)) == val.owner then triggerEvent("paintjob.SonApplyToAllServer", plr, pf, getPedOccupiedVehicle(plr)) car = getPedOccupiedVehicle(plr) setVehiclePaintjob(car,2) outputChatBox("You have enabled "..val.friendname,plr,255,255,255) end end else outputChatBox("Use /carshader 'Number'.") end addCommandHandler("carshader", setpaintjob) Should work now, and btw; If you are trying to combine two things use thing1..thing2 instead of thing1..""..thing2 Link to comment
-Doc- Posted April 21, 2016 Share Posted April 21, 2016 Why you deleting whole script. Someone can get help from this topic 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