Mass pm from web - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Mass pm from web (/Thread-Mass-pm-from-web) |
Mass pm from web - Pidrila - 02-07-2014 10:38 PM How i can mass pm to all players from web? I have a database where i add mass pm., but how can i display in game this message? Something like Code: "select mass_pm from database_ultima where topic_status =1" Sent from my PAP4055DUO using Tapatalk Code: [PLEVEL 1] okey i got that.. but how i can add not a sysmessage but something like a dialog appears? and in this dialog shows this message..?? RE: Mass pm from web - Extreme - 02-08-2014 12:38 AM serv.allclients sdialog blabla [dialog blabla] blabla blabla db.connect if ( <DB.connected> ) DB.QUERY "SELECT * FROM ibf_posts WHERE status='1'" if (<DB.ROW.NUMROWS> > 0) for R 0 <eval <DB.ROW.NUMROWS>-1> if (<DB.ROW.<eval <LOCAL.R>>.status> = 1) DB.EXECUTE "UPDATE ibf_posts SET status='0' WHERE pid='<DB.ROW.<eval <LOCAL.R>>.pid>'" serv.log Account: <DB.ROW.<eval <LOCAL.R>>.pid> mass pm from web dtext 100 <eval 100+(20*<dlocal.r>)> 0 <db.row.<eval <LOCAL.R>>.post> endif end endif endif Or [function f_mass_pm] db.connect if ( <DB.connected> ) DB.QUERY "SELECT * FROM ibf_posts WHERE status='1'" if (<DB.ROW.NUMROWS> > 0) for R 0 <eval <DB.ROW.NUMROWS>-1> if (<DB.ROW.<eval <LOCAL.R>>.status> = 1) DB.EXECUTE "UPDATE ibf_posts SET status='0' WHERE pid='<DB.ROW.<eval <LOCAL.R>>.pid>'" serv.log Account: <DB.ROW.<eval <LOCAL.R>>.pid> mass pm from web list.masspm.add <db.row.<eval <LOCAL.R>>.post> endif end endif endif [dialog blabla] blabla blabla for 0 <eval <list.masspm.count>-1> dtext 100 <eval 100+(20*<dlocal._for>)> 0 <list.masspm.<dlocal._for>> endfor RE: Mass pm from web - Pidrila - 02-08-2014 02:28 AM Code: [function f_mass_pm] tried, but dialog doesnt appear for player.. only if manualy .sdialog d_mass_pm and there appears all of messages that was made. i need only last one.. RE: Mass pm from web - Extreme - 02-08-2014 02:44 AM serv.allclients dialog_mass_pm [function dialog_mass_pm] trysrc <uid> sdialog d_mass_pm [function f_mass_pm] db.connect if ( <DB.connected> ) DB.QUERY "SELECT * FROM ibf_posts WHERE status='1'" if (<DB.ROW.NUMROWS> > 0) list.masspm.clear for R 0 <eval <DB.ROW.NUMROWS>-1> if (<DB.ROW.<eval <LOCAL.R>>.status> = 1) DB.EXECUTE "UPDATE ibf_posts SET status='0' WHERE pid='<DB.ROW.<eval <LOCAL.R>>.pid>'" serv.log Account: <DB.ROW.<eval <LOCAL.R>>.pid> mass pm from web list.masspm.add <db.row.<eval <LOCAL.R>>.post> endif endfor serv.allclients dialog_mass_pm endif endif another thing, clear the list before add the new msgs RE: Mass pm from web - Pidrila - 02-08-2014 03:41 AM Thanks extreme |