This repository has been archived by the owner on Jun 27, 2022. It is now read-only.
Releases: damopewpew/samp.js
Releases · damopewpew/samp.js
samp.js v0.1.9.6
Major Bug Fixes
- Strings were not being cast properly in CallNativeGDK causing some strings to duplicate randomly at times and functions not to work correctly
- Invalid player objects were being undefined rather than being a player object
- Returns from callbacks/events weren't being registered properly
- sampdb functions weren't converted properly and returned null values
Additions
- Global events. These events allow you to fire an event which gets fired in all scripts. Usage example:
$server.emit('myevent', var1, var2, var3 );
// Another script
$server.on('myevent', function(var1, var2, var3 ){
});
samp.js v0.1.9.5
_General_
- Fixed issue with CallNativeGDK cutting reference strings for some users
- Fixed issue with CallNativeGDK crashing when calling new SHA256_PashHash
function - Added support for arrays and referenced arrays in CallNativeGDK with a(int) v(float) A(int)
V(float) specifiers - Fixed memory leaks in CallNativeGDK
include() now searches js folder then js/include folder if file can't be
found - Fixed issue with callbacks/events from other plugins crashing server when
called - Fixed issue with invalid player objects in callbacks/events being
undefined - Added PlayerObject.js, GlobalObject.js, TextDraw.js, GlobalTextDraw.js, Vehicle.js ( thanks Laronic )
_MySQLConnection_
- query func now return class object
_Player.js_
- Added setVar(type, varName, value) func
- Added deleteVar(varName) func
- Added getVar(type, varName) func
- Added getVarType(varName) func
- Added getVarUpperIndex(varName) func
- Added getVarNameAtIndex(index) func
- Added textDrawCreate(text, pos) func
- Added textDrawDestroy(textDraw) func
- Added textDrawShow(textDraw) func
- Added textDrawHide(textDraw) func
- Added textDrawLetterSize(textDraw, size) func
- Added textDrawTextSize(textDraw, size) func
- Added textDrawAlignment(textDraw, align) func
- Added textDrawColor(textDraw, color) func
- Added textDrawUseBox(textDraw, toggle) func
- Added textDrawBoxColor(textDraw, color) func
- Added textDrawSetShadow(textDraw, shadow) func
- Added textDrawSetOutline(textDraw, outline) func
- Added textDrawBackgroundColor(textDraw, color) func
- Added textDrawSetFont(textDraw, font) func
- Added textDrawSetProportional(textDraw, toggle) func
- Added textDrawSetSelectable(textDraw, toggle) func
- Added textDrawSetString(textDraw, string) func
- Added textDrawSetPreviewModel(textDraw, previewModel) func
- Added textDrawSetPreviewRot(textDraw, previewRot) func
- Added textDrawSetPreviewVehCol(textDraw, color) func
- Added streamedInFor(target) func
- Added setMarkerFor(target, color) func
- Added showNameTagFor(target, show) func
- Added sendMessageTo(target, message) func
- Added sendDeathMessageToPlayer(killer, victim, weapon) func
- Added editObject(objectid) func
- Added selectObject() func
- Added cancelEdit() func
- Added objectCreate(objectid, pos, rot, drawDistance) func
- Added objectDestroy(objectid) func
- Added objectIsValid(objectid) func
- Added objectIsMoving(objectid) func
- Added objectEdit(objectid) func
- Added objectAttachToVehicle(objectid, vehicleid, offset, rot) func
- Added objectAttachCamera(playerid, objectid) func
- Added objectMove(objectid, speed, pos, rot) func
- Added objectStop(objectid) func
- Added objectSetPos(objectid, pos) func
- Added objectGetPos(objectid) func
- Added objectSetRot(objectid, rot) func
- Added objectGetRot(objectid) func
- Added objectModel(objectid) func
- Added objectSetNoCameraCol(objectid) func
- Added objectSetMaterial(objectid, materialIndex, modelid, txdName, textureName, materialColor) func
- Added objectSetMaterialText(objectid, text, materialIndex, materialSize, fontFace, fontSize, bold, fontColor, backColor, textAlignment) func
- Added spawnInfo(team, skin, pos, weaponData1, weaponData2, weaponData3) func
- Added spawn() func
- Added forceClassSelection() func
- Added posFindZ(pos) func
- Added playCrimeReport(target, crimeId) func
- Added playAudioStream(url, pos, distance, usePos) func
- Added stopAudioStream() func
- Added setSkillLevel(skill, level) func
- Added removeAttachedObject(index) func
- Added attachedObjectSlotUsed(index) func
- Added editAttachedObject(index) func
- Added setChatBubble(text, color, drawDistance, expireTime) func
- Added setCheckpoint(size, pos) func
- Added disableCheckpoint() func
- Added setRaceCheckpoint(type, pos, nextPos, size) func
- Added disableRaceCheckpoint() func
- Added setMapIcon(iconid, pos, markerType, color, style) func
- Added removeMapIcon(iconid) func
- Added attachCameraToObject(objectid) func
- Added interpolateCameraPos(from, to, time, cut) func
- Added interpolateCameraLookAt(from, to, time, cut) func
- Added startRecordingData(recordType, recordName) func
- Added stopRecordingData() func
- Added selectTextdraw(color) func
- Added cancelSelectTextdraw() func
- Added createExplosion(pos, type, radius) func
- Added getNetworkStats() func
- Added showMenu(menuId) func
- Added hideMenu(menuId) func
- Added gangZoneShow(zone, color) func
- Added gangZoneHide(zone, color) func
- Added gangZoneFlash(zone, color) func
- Added gangZoneStopFlash(zone) func
- Added attach3DTextLabel(label, pos) func
- Added delete3DTextLabel(label) func
- Added update3DTextLabel(label, color, text) func
- Added showDialog(dialogid, style, caption, info, button1, button2) func
- Added setVehicleParams(vehicleid, objective, doorsLocked) func
- Added shopName setter
- Added controllable setter
- Added disableRemoteVehicleCollisions setter
- Added enableCameraTarget setter
- Added stuntBonus setter
- Added cameraTargetObject getter
- Added cameraTargetVehicle getter
- Added cameraTargetPlayer getter
- Added cameraTargetActor getter
- Added cameraMode getter
- Added targetActor getter
- Added ping getter
- Added surfingObjectID getter
- Added isInCheckpoint getter
- Added isInRaceCheckpoint getter
- Added animationIndex getter
- Added version getter
- Added netStats_ConnectedTime getter
- Added netStats_MessagesReceived getter
- Added netStats_BytesReceived getter
- Added netStats_MessagesSent getter
- Added netStats_BytesSent getter
- Added netStats_MessagesRecvPerSecond getter
- Added netStats_ConnectionStatus getter
- Added netStats_GetIpPort getter
- Added drunkLevel setter/getter
- Added time setter/getter
- Added fightingStyle setter/getter
- Added worldBounds setter/getter
_Server_
- Added gameText func
- Added disableInteriorEnterExits func
- Added enableVehicleFriendlyFire func
- Added usePlayerPedAnims func
_FileSystem_
Fixed issue with $fs.read reading data incorrectly
_streamer.inc.js_
- Added array support
- Fixed various issues
_Examples_
- Converted grandlarc gamemode to JavaScript https://github.com/damospiderman/samp.js/tree/master/examples/grandlarc
samp.js v0.1.9.4
Changes/Bug Fixes
- Player.js
- Various setters/getters had incorrectly named variables causing issues with player.armour,player.health etc to not work ( thanks andievandy )
- player.world added ( andievandy )
- player.message( color, message ) Added (SendClientMessage alias)
- Multiple funcs/getter/setters added by Laronic
- Added cameraPos getter/setter
- Added cameraLookAt getter/setter
- Added cameraAspectRatio getter
- Added cameraZoom getter
- Added cameraFrontVector getter
- Added surfingVehicle getter
- Added vehicleSeat getter
- Added toggleSpectate setter
- Added setCameraBehind() func
- Added inVehicle(vehicleid) func
- Added inAnyVehicle() func
- Added spectateVehicle(vehicleid, mode) func
- Added spectatePlayer(target, mode) func
- Added isAdmin() func
- Added isNPC() func
- Added kick() func
- Added ban(reason) func
- Various setters/getters had incorrectly named variables causing issues with player.armour,player.health etc to not work ( thanks andievandy )
- Server.js - Additions by Laronic
- Added
rcon(cmd)
func - Added
gamemode
getter/setter
- Added
- RegisterPublic was being parsed incorrectly causing callbacks to be cancelled when returning 1 instead of 0
- Events.js caused callbacks to not be called in multiple scripts if not defined in the main script
- print was causing malformed characters on some(one) machine
- Fixed memory leak in print
- mysql query now parses date objects to mysql timestamp ( thanks Laronic )
samp.js v0.1.9.3
Bugfixes:
- Typos in Player.js for this._id
- CallNativeGDK multiple string issue
- CallNativeGDK format string being read incorrectly at times
- Issues with the .inc converter not detecting some reference strings correctly
- Added extra checks to stop server crash when using mysql close
- mysql.ping returning undefined
samp.js v0.1.9.2 - BUGFIX
BUGFIX -
Fixed issue with CallNativeGDK return undefined
Fixed issue with CallNativeGDK setting all supplied floats to the same value
samp.js v0.1.9.1 BUGFIX
BUGFIX
- Fixed issue with publics/callbacks not having correct variables
samp.js v0.1.9
Changelog:
- Added GDK to call native functions and hook publics
- samp.js filterscript is no longer needed
- Added RegisterPublic to register public function callbacks to the $server.on events
- Added CallNativeGDK for calling native functions via GDK
- Various bug fixes
samp.js v0.1.8.1
There was a small bug in Player.js class to do with setting position.