Offline PM System? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Offline PM System? (
/showthread.php?tid=645383)
Offline PM System? -
SeanDenZYR - 26.11.2017
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
Re: Offline PM System? -
grymtn - 26.11.2017
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
Re: Offline PM System? -
SeanDenZYR - 26.11.2017
well i'm not really into sql, i prefer y_ini
Re: Offline PM System? -
grymtn - 26.11.2017
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?
Re: Offline PM System? -
RoboN1X - 26.11.2017
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?