Author Topic: PSA 0.20  (Read 10615 times)

0 Members and 1 Guest are viewing this topic.

Offline cocky

  • Street Thug
  • *
  • Posts: 24
    • View Profile
PSA 0.20
« 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.
« Last Edit: August 04, 2012, 02:48:47 pm by cocky »

Offline zeeshan

  • Street Thug
  • *
  • Posts: 4
    • View Profile
Re: PSA 0.20
« Reply #1 on: August 01, 2012, 02:47:54 pm »
Link not working

Offline cocky

  • Street Thug
  • *
  • Posts: 24
    • View Profile
Re: PSA 0.20
« Reply #2 on: August 01, 2012, 03:29:56 pm »
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

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: PSA 0.20
« Reply #3 on: August 01, 2012, 04:30:38 pm »
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.

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline Fuzzy168

  • VC:MP Veteran
  • *****
  • Posts: 729
  • Programming since 2011
    • View Profile
Re: PSA 0.20
« Reply #4 on: August 02, 2012, 04:45:59 am »
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.
I'm beginning to feel like a Lag God, Lag God

Offline heekz.shadow

  • LU testers
  • Made Man
  • *
  • Posts: 249
    • View Profile
Re: PSA 0.20
« Reply #5 on: August 02, 2012, 06:57:46 pm »
Aside the fact that PSA uses a 500ms timer ( really Boss ? ) it's cool. I mean, it has SQLite support!
Code: [Select]
[20:23] <habi> later only i heard that lu chatbox is customizable. On my first visit, it appeared ugly.
[20:23] <habi> May be that also be the reason why lu has no players

Offline cocky

  • Street Thug
  • *
  • Posts: 24
    • View Profile
Re: PSA 0.20
« Reply #6 on: August 04, 2012, 01:07:01 pm »
Found these using google cache, i am still searching for executable file.

Add this to your script:

[pawn]//------------------------------------------------------------------------------------------------------

PerformSQLquery(str&#91;]) // PSA function for performing queries.
{
new File: filex;
filex = fopen("sql_input.psa");
fwrite(filex,str);
fclose(filex);
return false;
}

//------------------------------------------------------------------------------------------------------

PerformSQLquerySelect(qid&#91;], 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&#91;], str[]){ // Function for outputting "select" queries results. qid is the one from PerformSQLquerySelect.
printf("Received query %s: %s",qid,str);
}

//------------------------------------------------------------------------------------------------------

SendToIRC(str&#91;]) // 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

Code: [Select]
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.
« Last Edit: August 04, 2012, 02:49:38 pm by cocky »

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: PSA 0.20
« Reply #7 on: August 04, 2012, 01:36:07 pm »
(mirror) PSA Download: http://www.solidfiles.com/d/87f0d177fe/

I forgot that I uploaded it on Internet  :)
« Last Edit: August 04, 2012, 01:39:07 pm by sseebbyy »

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.