I have created a ULX script to change the sprays of other using spraymesh. It doesn't produce any errors but it also just doesn't work.
[lua]local CATEGORY_NAME = "Spray Commands"
function ulx.setspray( calling_ply, target_ply, inputa)
linka = string.Explode("//", inputa)
imgfixa = string.Explode(".", inputa)
imgfixa2 = string.Explode("/", inputa)
if linka[1] == "http:" or linka[1] == "https:" then
if imgfixa[1] == "http://imgur" then
if imgfixa2[4] == "gallery" then
target_ply:SendLua([[LocalPlayer():ConCommand("SprayMesh_URL i.imgur.com/"]] .. imgfixa2[5].. [[".jpg")]])
else
target_ply:SendLua([[LocalPlayer():ConCommand("SprayMesh_URL i.imgur.com/"]] .. imgfixa2[4].. [[".jpg")]])
end
elseif imgfixa[2] == "youtube" then
target_ply:SendLua([[LocalPlayer():ConCommand("SprayMesh_URL youtube."]] .. imgfixa[3][[)]])
else
target_ply:SendLua([[LocalPlayer():ConCommand("SprayMesh_URL "]] .. linka[2][[)]])
end
else
if imgfixa[1] == "imgur" then
if imgfixa2[2] == "gallery" then
target_ply:SendLua([[LocalPlayer():ConCommand("SprayMesh_URL i.imgur.com/"]] .. imgfixa2[3].. [[".jpg")]])
else
target_ply:SendLua([[LocalPlayer():ConCommand("SprayMesh_URL i.imgur.com/"]] .. imgfixa2[2].. [[".jpg")]])
end
elseif imgfixa[1] == "imgur" then
target_ply:SendLua([[LocalPlayer():ConCommand("SprayMesh_URL i.imgur.com/"]].. imgfixa2[3].. [[".jpg")]])
elseif imgfixa[2] == "youtube" then
target_ply:SendLua([[LocalPlayer():ConCommand("SprayMesh_URL youtube."]].. imgfixa[3][[)]])
else
target_ply:SendLua([[LocalPlayer():ConCommand("SprayMesh_URL "]] .. inputa[[)]])
end
end
ulx.fancyLogAdmin( calling_ply, true, "#A had their spray to" ..inputa.. "by #T" , target_ply )
end
local setspray = ulx.command( CATEGORY_NAME, "ulx setspray", ulx.setspray, "!setspray", true, true)
setspray:addParam{ type=ULib.cmds.StringArg, hint= "Enter your spray URL here!" }
setspray:addParam{ type=ULib.cmds.PlayersArg }
setspray:help( "We use: YouTube, Imgur, others." )[/lua]
Any help is apreciated :)
Why don't you post it in the spray mesh thread?
[QUOTE=code_gs;47182523]Why don't you post it in the spray mesh thread?[/QUOTE]
Because I think that the error is not related to spraymesh itself but just something in the format.
Sorry, you need to Log In to post a reply to this thread.