Jump to content

News Resource


iRack

Recommended Posts

Posted

Hi ! Can someone help me ? I want: ONLY in that cylinder you can use command [/ad], only in it, I don't know how to do it. ( it's an advertisement system for RPG ) Thanks a lot ! :)

 

 

function Advertisment(thePlayer, commandName, ...)
		local players = getElementsByType("player")
		local playerName = getPlayerName ( thePlayer )
		local chatContent = {...}
		for index, player in ipairs ( players ) do
			outputChatBox( "Advertisment from " .. playerName.. ": " ..table.concat ( chatContent, " "), player, 0, 190, 40)
		end
	end
addCommandHandler( "ad", Advertisment )

cylinder = createMarker(1168.6981201172, -1489.6285400391, 21.756763458252, "cylinder", 5, 100, 0, 0)
setElementInterior(cylinder, 0)

function Advertisment (thePlayer)
 if source == Advertisment then
  setElementInterior(thePlayer, 0)
  setElementPosition(thePlayer, 1168.6981201172, -1489.6285400391, 22.756763458252)
 elseif source == cylinder then
  outputChatBox("Type [/ad] to publish your advertisment.", thePlayer, 255, 255, 0)
  end
end
addEventHandler("onMarkerHit", getRootElement(), Advertisment)

 

Posted
14 minutes ago, iRack said:

Thanks


cylinder = createMarker(1168.6981201172, -1489.6285400391, 21.756763458252, "cylinder", 5, 100, 0, 0)
setElementInterior(cylinder, 0)

function Advertisment(thePlayer, commandName, ...)
  if isElementWithinMarker(thePlayer,cylinder) then
		local players = getElementsByType("player")
		local playerName = getPlayerName ( thePlayer )
		local chatContent = {...}
		for index, player in ipairs ( players ) do
			outputChatBox( "Advertisment from " .. playerName.. ": " ..table.concat ( chatContent, " "), player, 0, 190, 40)
		end
    else
    outputChatBox("#ff0000* you must be in the marker",thePlayer,255,255,255,true)
    end
	end
addCommandHandler( "ad", Advertisment )

function Advertisment (thePlayer)
 if source == Advertisment then
  setElementInterior(thePlayer, 0)
  setElementPosition(thePlayer, 1168.6981201172, -1489.6285400391, 22.756763458252)
 elseif source == cylinder then
  outputChatBox("Type [/ad] to publish your advertisment.", thePlayer, 255, 255, 0)
  end
end
addEventHandler("onMarkerHit", getRootElement(), Advertisment)

try this

Skype 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

Posted
14 hours ago, iRack said:

Have

u r welcome +_+

Skype 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...