AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   HL1 Servers (HLDS) (https://forums.alliedmods.net/forumdisplay.php?f=131)
-   -   HLDS-V8: Extending HLDS with V8 JavaScript engine (https://forums.alliedmods.net/showthread.php?t=236492)

deejayy 03-06-2014 03:48

HLDS-V8: Extending HLDS with V8 JavaScript engine
 
I've made a PoC C++ source code (metamod plugin) which demonstrates the usage of Javascript to extend HLDS.

https://github.com/deejayy/hlds-v8

Anyone interested?

ArabicMan 03-06-2014 05:51

Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
 
What the importance of that ? i read what in site but not understand anything

deejayy 03-06-2014 05:58

Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
 
It's an opportunity to break with Pawn and use something more efficient and easier language to write plugins.

It brings the possibility to extend with almost everything you can imagine (as you can extend eg. node.js, which is also based on V8 ).

Also, availibility to reload a script in real time, in the a middle of a map.

With some investment, it can be added to hook HLDS engine functions not provided by plugin api, etc.

My fantasy is very limited, but i think this community has unlimited ideas for this :)

YamiKaitou 03-06-2014 06:25

Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
 
I'd rather stick with AMXX

ArabicMan 03-06-2014 06:44

Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
 
Quote:

Originally Posted by deejayy (Post 2108176)
It's an opportunity to break with Pawn and use something more efficient and easier language to write plugins.

It brings the possibility to extend with almost everything you can imagine (as you can extend eg. node.js, which is also based on V8 ).

Also, availibility to reload a script in real time, in the a middle of a map.

With some investment, it can be added to hook HLDS engine functions not provided by plugin api, etc.

My fantasy is very limited, but i think this community has unlimited ideas for this :)

Nice , i want to join this project or what i do ?
How to use it ?

deejayy 03-06-2014 06:50

Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
 
Everything is described at the github repository of the project. You can fork or commit as you wish, create issues, etc.

deejayy 03-10-2014 05:57

Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
 
Code:

function ClientCommand(params)
{
        if (params.argv[0] == 'say' || params.argv[0] == 'say_team') {
                if (params.args.match(/[0-9 ]+\.[0-9 ]+\.[0-9 ]+\.[0-9 ]+|2[6-9 ][0-9 ][0-9 ][0-9 ]|\.com|\.net|\.hu|\.org|\.ro|\.sk/)) {
                        console.log('SPAMMER! ' + v8.getPlayerName(params.id));
                        return V8_SUPERCEDE;
                }
        }
}


jonnzus 03-10-2014 09:24

Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
 
Very cool, I will probably use this.

Edit & Suggestion:
Add option to support amxx admins.

deejayy 03-11-2014 07:53

Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
 
Detecting no-spread cheat ("shaky" screen):

Code:

function CmdStart(params)
{
        var p = players[params.id] || new player();
        if (p.viewangles.x == params.viewangles.x || p.viewangles.y == params.viewangles.y) {
                p.nospread *= 0.9;
        } else {
                p.nospread += 1;
        }
        if (p.nospread > 1000) {
                console.log("No-spread cheat detected! " + v8.getPlayerName(params.id));
        }
        p.viewangles.x = params.viewangles.x;
        p.viewangles.y = params.viewangles.y;
};


Neeeeeeeeeel.- 03-11-2014 08:26

Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
 
I like javascript, nice work.


All times are GMT -4. The time now is 05:43.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.