Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => ShowRoom (pawn) => Topic started by: cocky on August 01, 2012, 05:06:07 am
-
Pawn Supporting Application
PSA is an external application, extending Pawn's functionality. It communicates with Pawn through text files, allowing PSA to perform a variety of actions normally unavaliable in Pawn. You can think of PSA as a plugin, only external.
Currently it allows to make a fully-functional IRC echo and SQL data storage.
Download
http://www.solidfiles.com/d/87f0d177fe/ (by seebby)
The archive includes:
1)readme.txt - help.
2) psa.exe - PSA executable.
3) psa.cfg - PSA configuration.
4) echo.pwn - Blank script.
5) MySQL.dll - MySQL library.
Installation
1. Put the appropriate functions in your script. You can either take them from psa.pwn, base your script on psa.pwn or use psa.pwn as a filterscript.
Here are the key Pawn functions:
* PPSAtimer() // PSA timer for reading things from files.
* SetTimer("PSAtimer",100,1) // PSA timer activation.
* SendToIRC(str[]) // PSA function for sending things to IRC.
* PerformSQLquery(str[]) // PSA function for performing queries (which do not return values).
* PerformSQLquerySelect(qid[], str[]) // PSA function for performing "select" queries.
* OnQueryResult(qid[], str[]) // PSA event which gets called when "select" query returned a value. qid is the one you specified for PerformSQLquerySelect.
2. Put psa.exe, psa.cfg and MySql.Data.dll in your server's root dir (where your vcmp-svr.exe is).
3. Edit psa.cfg with your IRC/SQL settings.
4. Launch psa.exe.
Known issues
1. Requires .NET Framework 3.0 on the server machine to run.
2. As a consequence of the above, works with Windows server only.
3. IRC's quit message (if you close psa.exe) is "connection reset by peer".
Feedback
If you have questions/suggestions, post them here.
Version History
=== 0.20 === 24.04.10
Features:
1) Performing SQL queries.
2) Required framework version is now 3.0 (instead of 3.5).
Fixes:
1) Fixed high CPU usage.
=== 0.10 === 09.02.10
Features:
1) Sending messages to IRC.
2) Receiving messages from IRC.
Post done by Boss so the credits goes to him, i only reposted it since it got deleted.
-
Link not working
-
Link not working
I forgot the main part, I got a backup of all VC-MP files including PSA in my old computer the plug is lost., I won't be able to get the file until i search and find the plug, so can someone else who got a backup please post! :D
-
Link not working
I forgot the main part, I got a backup of all VC-MP files including PSA in my old computer the plug is lost., I won't be able to get the file until i search and find the plug, so can someone else who got a backup please post! :D
When is made that backup? If is recent, can you upload it ?
Maybe I can get some important old topics.
-
In my memory backup contains: GUPS v1.16a, PSA, VC-MP Client and Server.
Gups, NO.
PSA, Duh.
VC-MP Client, YOU MAD?
Server, POSSIBLE.
-
Aside the fact that PSA uses a 500ms timer ( really Boss ? ) it's cool. I mean, it has SQLite support!
-
Found these using google cache, i am still searching for executable file.
Add this to your script:
[pawn]//------------------------------------------------------------------------------------------------------
PerformSQLquery(str[]) // PSA function for performing queries.
{
new File: filex;
filex = fopen("sql_input.psa");
fwrite(filex,str);
fclose(filex);
return false;
}
//------------------------------------------------------------------------------------------------------
PerformSQLquerySelect(qid[], str[]) // PSA function for performing "select" queries.
{
format(str,sizeof(str),"%d %s",qid,str);
new File: filex;
filex = fopen("sql_input.psa");
fwrite(filex,str);
fclose(filex);
return false;
}
//------------------------------------------------------------------------------------------------------
OnQueryResult(qid[], str[]){ // Function for outputting "select" queries results. qid is the one from PerformSQLquerySelect.
printf("Received query %s: %s",qid,str);
}
//------------------------------------------------------------------------------------------------------
SendToIRC(str[]) // PSA function for sending things to IRC.
{
new File: filex;
filex = fopen("irc_input.psa");
fwrite(filex,str);
fclose(filex);
return false;
}
//------------------------------------------------------------------------------------------------------
public PSAtimer() // PSA timer for reading things from IRC.
{
new cont[1024], str[256], msg[256], File: filex;
if(fexist("irc_output.psa")){
filex = fopen("irc_output.psa");
fread(filex,cont,sizeof(cont));
fclose(filex);
while(strfind(cont,"\n")>0){
strmid(str,cont,0,strfind(cont,"\n"));
strdel(cont,0,strfind(cont,"\n"));
format(msg,sizeof(msg),"**(I-R-C)**::=> %s ",str);
SendClientMessageToAll(0xFFFFFFAA,msg);
print(msg);
}
fremove("irc_output.psa");
}
if(fexist("sql_output.psa")){
new qid[256];
filex = fopen("sql_output.psa");
fread(filex,cont,sizeof(cont));
fclose(filex);
while(strfind(cont,"\n")>0){
strmid(str,cont,0,strfind(cont,"\n"));
strdel(cont,0,strfind(cont,"\n"));
new space = strfind(qid," ");
strmid(qid,str,0,space);
strdel(str,0,space);
OnQueryResult(qid,str);
format(msg,sizeof(msg),"OnIrc>> %s: %s ",qid,str);
SendClientMessageToAll(0xFFFFFFAA,msg);
print(msg);
}
fremove("irc_output.psa");
}
}
forward PSAtimer();
public OnGameModeInit()
{
SetTimer("PSAtimer",500,1);return 1;
}
[/pawn]
PSA.cfg
irc_enabled true
irc_serv irc.gtanet.com
irc_port 6667
irc_nick ServerBotz
irc_pass 12345
irc_chan #(you channel)
Download
http://www.solidfiles.com/d/87f0d177fe/ (by seebby)
UPDATED the 1st post thanks to seebby for link.
-
(mirror) PSA Download: http://www.solidfiles.com/d/87f0d177fe/
I forgot that I uploaded it on Internet :)