SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 04/08/2015, 04:49 PM   #81
theYiin
Big Clucker
 
theYiin's Avatar
 
Join Date: Aug 2013
Location: Lithuania
Posts: 84
Reputation: 53
Default Re: samp.js - JavaScript for SA-MP

Quote:
Originally Posted by Laronic View Post
Command handler and example usages has been added and can be viewed here for whoever is interested
Finally! <3

Code:
cmds.set(['car', 'veh', 'vehicle'], function(player, data) {

}
would be awesome too
theYiin is offline   Reply With Quote
Old 04/08/2015, 05:25 PM   #82
Laronic
Huge Clucker
 
Laronic's Avatar
 
Join Date: Mar 2011
Posts: 412
Reputation: 57
Default Re: samp.js - JavaScript for SA-MP

Quote:
Originally Posted by theYiin View Post
Finally! <3

Code:
cmds.set(['car', 'veh', 'vehicle'], function(player, data) {

}
would be awesome too
Great suggestion! check github for updated version

(Notice I'm using add instead of set here)
pawn Code:
cmds.add(['announce', 'anno'], function(player, data)
{
    if(!data.text) {
        return player.message(`Usage: /${data.cmd} [msg]`);
    }
    $server.message(`Announcement: ${data.text}`);
});
Laronic is offline   Reply With Quote
Old 05/08/2015, 12:28 PM   #83
DRIFT_HUNTER
High-roller
 
Join Date: Oct 2009
Posts: 2,073
Reputation: 188
Default Re: samp.js - JavaScript for SA-MP

Just a quick question. Is it possible to use npm modules?
__________________
Looking for someone to start drifting server, drop me a pm if you are interested.


Any PM's that include question about any kind of help will be ignored.
Use appropriate boards for that
DRIFT_HUNTER is offline   Reply With Quote
Old 05/08/2015, 01:27 PM   #84
!damo!spiderman
Huge Clucker
 
!damo!spiderman's Avatar
 
Join Date: Oct 2006
Posts: 244
Reputation: 160
Default Re: samp.js - JavaScript for SA-MP

Quote:
Originally Posted by DRIFT_HUNTER View Post
Just a quick question. Is it possible to use npm modules?
Unfortunately it is not. Would be a nice feature but to implement nodejs would be a big under taking... I did look into it though at one stage
__________________
!damo!spiderman is offline   Reply With Quote
Old 05/08/2015, 02:13 PM   #85
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 3,794
Reputation: 1174
Default Re: samp.js - JavaScript for SA-MP

This is really interesting! Nice job!
__________________
Join the best Cops And Robbers in SA-MP, today. svr.sfcnr.com:7777

Lorenc_ is offline   Reply With Quote
Old 05/08/2015, 07:08 PM   #86
DRIFT_HUNTER
High-roller
 
Join Date: Oct 2009
Posts: 2,073
Reputation: 188
Default Re: samp.js - JavaScript for SA-MP

Quote:
Originally Posted by !damo!spiderman View Post
Unfortunately it is not. Would be a nice feature but to implement nodejs would be a big under taking... I did look into it though at one stage
Thx for quick answer, kinda expected that answer but still was just curious.
__________________
Looking for someone to start drifting server, drop me a pm if you are interested.


Any PM's that include question about any kind of help will be ignored.
Use appropriate boards for that
DRIFT_HUNTER is offline   Reply With Quote
Old 24/08/2015, 07:03 PM   #87
Battlezone
Gangsta
 
Battlezone's Avatar
 
Join Date: Aug 2013
Location: Berlin
Posts: 805
Reputation: 162
Default Re: samp.js - JavaScript for SA-MP

Great work, and I like the latest bug fixes
Battlezone is offline   Reply With Quote
Old 25/08/2015, 05:15 AM   #88
SkittlesAreFalling
Big Clucker
 
Join Date: Oct 2013
Posts: 155
Reputation: 14
Default Re: samp.js - JavaScript for SA-MP

What is 'let'?
SkittlesAreFalling is offline   Reply With Quote
Old 25/08/2015, 05:18 AM   #89
ev0lution
Gangsta
 
ev0lution's Avatar
 
Join Date: Jul 2009
Posts: 681
Reputation: 380
Default Re: samp.js - JavaScript for SA-MP

Quote:
Originally Posted by SkittlesAreFalling View Post
What is 'let'?
https://developer.mozilla.org/en-US/...Statements/let
__________________
ev0lution is offline   Reply With Quote
Old 25/08/2015, 05:21 AM   #90
SkittlesAreFalling
Big Clucker
 
Join Date: Oct 2013
Posts: 155
Reputation: 14
Default Re: samp.js - JavaScript for SA-MP

Nevermind, great work!

Last edited by SkittlesAreFalling; 25/08/2015 at 06:06 AM.
SkittlesAreFalling is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript. Banditukas Everything and Nothing 18 04/04/2015 05:00 PM
[Pedido] botão: script/ HTML/ JAVASCRIPT | SAMP FOLDER/FILE MestreSmart Português/Portuguese 6 28/02/2015 05:16 PM
Use PHP in javascript Banditukas Everything and Nothing 5 08/11/2014 05:44 AM
javascript samp:// [Ger]Little_Grandpa Help Archive 6 21/08/2010 06:24 PM


All times are GMT. The time now is 03:17 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.