xXGhostXx Posted October 10, 2018 Share Posted October 10, 2018 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
Dimos7 Posted October 10, 2018 Share Posted October 10, 2018 What exacly you try to do post message after 30 minutes or command can used after 30 minutes? Link to comment
xXGhostXx Posted October 10, 2018 Author Share Posted October 10, 2018 29 minutes ago, Dimos7 said: What exacly you try to do post message after 30 minutes or command can used after 30 minutes? No ! My problem fixed ! Thanks for your seen ! Link to comment
Recommended Posts