Jump to content

[HELP] Adver System


xXGhostXx

Recommended Posts

I writed adver system !

i have a problem !

setTimer for show news dont work !

function tablighDadan ( thePlayer, command, ... )
	local x,y,z = getElementPosition(thePlayer)
	local fasele = getDistanceBetweenPoints3D(1209.4580078125, -1752.4365234375, 13.593618392944,x,y,z)
	local pickduty = createPickup(1209.4580078125, -1752.4365234375, 13.593618392944, 3, 1239, 1)
	local gheymatshansi = math.random(300,1000)
	local matnTabligh = table.concat({...}, " ")
	if fasele < 1 then
	if ... then
		if (getPlayerMoney(thePlayer)>= gheymatshansi) then
		takePlayerMoney(thePlayer, gheymatshansi)
		outputChatBox("#ff0000[CNN]:#FFFFFF Tabligh Shoma Tayid Shod va Bad Az #ff000050#ffffff Sanie Gozashte Mishavad!", thePlayer, 255, 255, 255, true)
		outputChatBox("#ff0000[CNN]:#FFFFFF Hazine: "..gheymatshansi, thePlayer, 255, 255, 255, true)
		setTimer(matnTabligh,30000,1,matnTabligh,30000,matnTabligh) --Timer
		outputChatBox("#ff0000[CNN]:#FFFFFF tabligh :"..matnTabligh, root, 255, 255, 255, true)

	else
		outputChatBox("#ff0000[Error]: #ffffffShoma Be $"..gheymatshansi.." Baraye Khabar Dadan Niaz Darid!",thePlayer,255,255,255,true)
	end
	else
		outputChatBox("#00ff00Bezan: /ad <Matn>", thePlayer, 255, 255, 255, true)
    end
	else
		outputChatBox("#ff0000[Error]: #ffffffShoma Bayad Dar CNN Bashid!", thePlayer, 255, 255, 255, true)
    end
	end
addCommandHandler("ad", tablighDadan)
addEventHandler("onResourceStart",getResourceRootElement(),tablighDadan)

Please answer me !

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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