Offline PM System?
#1

i've been looking through filterscripts but can't find one. Is there already? please drop the link below.. Or if there isn't , please send a code. I'm struggling in making it
Reply
#2

if you have mysql or sql or anything that you can save and load within a server, You can make like /offlinepm [fullusername] [message] and save it like

Код:
new query[128];
mysql_format(mysqlhandlename,query,sizeof(query),"INSERT INTO yoursmstablename (sendername,receivername,text,status) VALUES (%s,%s,%s,0)",GetName(playerid),[fullusername],[text]);
mysql_query(mysqlhandlename,query);
also get offlinepms from table by playername when they log in and if status is 0 send them a client message saying "You have (howmuch ever he has unread) offline pms unread" and when he reads them use another query to change status to 1 so he wont get message for that offline pm ever again
Reply
#3

well i'm not really into sql, i prefer y_ini
Reply
#4

im sure it can be created in ini too but its too complicated for really saving i guess but you can do like on your ini files add your players ini files like pm1= pm2= pm3=. With same thinking if i write /offlinepm CHAVES_VALLES asd. CHAVES_VALLES's ini file would get updated to pm1=asd(i didnt add here sender name you can still do it like upside). Its not that hard but what are you going to do if someone just leaves game for a month and he has lots of friends that pm him? you would have to set like lots of pm(pmnumber) variables and this isnt verry efficient use on normal everyday login players is it?
Reply
#5

Quote:
Originally Posted by SeanDenZYR
Посмотреть сообщение
well i'm not really into sql, i prefer y_ini
That's not a good idea to do, i prefer to do it on plain text file instead. Why you don't want to use SQL or any other database type?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)