PVars to enums with RegEx
#1

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
Reply
#2

Are you using Notepad++ ?
Reply
#3

Yes I would like replace it in notepad++
Reply
#4

Thank you.

But I tried to learn RegEx but I still don't understand so much to make these two RegEx.
Reply


Forum Jump:


Users browsing this thread: