PVars to enums with RegEx - 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: PVars to enums with RegEx (
/showthread.php?tid=352332)
PVars to enums with RegEx -
Skidr0w - 19.06.2012
Hello,
I have a huge gamemode with lot of PVar-s, and I would like to convert it back to use enums (because of speed and I read what ****** wrote about them.)
That's would be a very big job to change them by line-by-line. So I wondering on change them with RegEx, but I am don't know how to use RegEx.
I saw ****** made a RegEx for replacing dcmd to zcmd here:
http://forum.sa-mp.com/showthread.ph...gex#post390425
Can I ask somebody who have knowledge in RegEx to make it for me?
So I would like to find: SetPVar*(playerid, "*", *);
And replace it with: PlayerInfo[playerid][*] = *;
and
I would like to find: GetPVar*(playerid, "*");
And replace it with: PlayerInfo[playerid][*];
Tank you very much!
Skidr0w
Re: PVars to enums with RegEx -
MadeMan - 19.06.2012
Are you using Notepad++ ?
Re: PVars to enums with RegEx -
Skidr0w - 19.06.2012
Yes I would like replace it in notepad++
Re: PVars to enums with RegEx -
Skidr0w - 19.06.2012
Thank you.
But I tried to learn RegEx but I still don't understand so much to make these two RegEx.