22.07.2015, 23:38
Quote:
I also have a working example of reading MapAndreas files natively in samp.js with both buffered and non-buffered versions if anyone is interested give me a shout and I will make it pretty and upload it |
I also have a working example of reading MapAndreas files natively in samp.js with both buffered and non-buffered versions if anyone is interested give me a shout and I will make it pretty and upload it |
var map = require('heightmap').full('scriptfiles/SAfull.hmap');
// or alternatively nobuffer
var map = require('heightmap').nobuffer('scriptfiles/SAfull.hmap');
var height = map.Get(1292.0320, -2012.4912);
$server.on('GameModeInit', function() {
print('test');
print('test2');
return 1;
});
$server.on('PlayerConnect', function(player) {
print('Player ' + player.id + ' joined.');
return 1;
});
[18:51:07] Player 0 joined. [18:51:07] test [18:51:07] test2 [18:51:07] Player 0 joined. [18:51:07] test [18:51:07] test2
For some reason the print function is getting called two times in the latest version (v0.1.9.4). Maybe it could also be an issue in the event system?
With the follow code: PHP код:
Код:
[18:51:07] Player 0 joined. [18:51:07] test [18:51:07] test2 [18:51:07] Player 0 joined. [18:51:07] test [18:51:07] test2 |
Finally! <3
Код:
cmds.set(['car', 'veh', 'vehicle'], function(player, data) { } |
cmds.add(['announce', 'anno'], function(player, data)
{
if(!data.text) {
return player.message(`Usage: /${data.cmd} [msg]`);
}
$server.message(`Announcement: ${data.text}`);
});
Going to play with this interesting plugin. For two years of my development in PAWN I was dreaming about such a language with dynamic array sizes, closures, flexible & handy objects, normal event/callback system and no freaking PAWN compiler
Well, I just wanted to say "thanks, I love this plugin's idea and I'm going to play with it or even use it". +Rep for you, keep going! |
SendClientMessage(player.id, COLOR.WHITE, String.format("Welcome to %s, %s!", ServerData.name, player.name);
SendClientMessage(player.id, COLOR.WHITE, String.format("Welcome to %s, %s!", ServerData.name, player.name));
[ERROR][samp.js] js/cops&robbers.js:317: SyntaxError: missing ) after argument list [debug] Server crashed due to an unknown error [debug] Native backtrace: [debug] #0 0049dc0c in ?? () from samp-server.exe [debug] #1 779bd2d9 in ?? () from C:\WINDOWS\SYSTEM32\ntdll.dll [debug] #2 779e8e5c in ?? () from C:\WINDOWS\SYSTEM32\ntdll.dll [debug] #3 698a3264 in ?? () from C:\WINDOWS\system32\apphelp.dll [debug] #4 698a328c in ?? () from C:\WINDOWS\system32\apphelp.dll [debug] #5 0049eef9 in ?? () from samp-server.exe [debug] #6 0048b460 in ?? () from samp-server.exe [debug] #7 004a5a3b in ?? () from samp-server.exe [debug] #8 0049cf72 in ?? () from samp-server.exe |