Scripts
207 files
-
Synced stream/dimension variables
By Captien
This resource introduces new types of synced data variables along with entity.setVariable and entity.setOwnVariable to lower the affected user with syncing such data to a certain scope.
Stream variables: Introduces synced data variables across streamed entities. The entity provides his data to the streamed clients and the vice versa. Dimensional variables: Introduces synced data variables across a dimension. The entity provides data to all clients in the dimension with a option to have a persistent data mode which keeps the data synced across multi dimension change. Note: Dimensional variables won't operate properly if you don't use its custom function entity.setDimension due to some complications that couldn't be sorted out.
More information about the API usage can be found in github repo.
This resource was a collaboration with me and @materiawith a vision to release a series of open sourced resources later on.
130 downloads
(2 reviews)0 comments
Submitted
-
Winter Event Gift Collector - WIP - but working
By krane
Hello, this is the winter event script I was planning to release this winter.
As it currently stands i'll be a bit bussy this winter, won't have time for free open source projects like this one.
I've wanted to create a more complex one, with lots of micro-events inside but time won't allow it so this is useable, you just need to get 10 coordinates of your choice for this fully work for your server.
GET A DEVELOPER !
This script is !NOT! plug-and-play since it requires AT LEAST adding 7 more coordinates.
I promise next winter for a better event, but for now, i'm struggling with my GF birthday also LOL
🥰🤪
Get in contact with me:
Discord: kraneq
I'll respond to question
117 downloads
(0 reviews)0 comments
Submitted
-
[JS] Regional Restrictions
By unkaid
Simple solution to check incoming connections from unwanted countries.
I. Install geoip-Lite: npm i geoip-lite
II. Edit country_ban list with the specified country codes https://dev.maxmind.com/geoip/legacy/codes/iso3166/
III. Save and put this script to "server-files\packages" and add require('./countryBan'); in index.js
91 downloads
- server-side
- javascript
- (and 5 more)
(1 review)0 comments
Submitted
-
Simple Rainbow Text
Hey !
So this script adds simply a Rainbow Text usefull for display some text like ur discord server or server name ...
Installing:
Just drag the RainbowText folder to ur client_package and don't forget to add the require('RainbowText/rainbowtext.js'); to ur index.js
Notes:
I’ve done my best to explain to you everything you need to know about the code. If you have any questions, just post it.
The script can probably be improved, I’m still new to JS I’m learning from day to day, if you have any advisors do not hesitate. 😅
For french people just go to my Github to see how the installation work or just translate it lul 😋:
https://github.com/SuperCoolNinja/SimpleRainbowText
89 downloads
(2 reviews)0 comments
Updated
-
Generic Native Keypad
By -Andreas
Originally created around 2019, so it might be broken with newer versions of RageMP, though I believe I fixed this at some point.
The system allows you to set up a keypad server-side and hook an action to the Confirm button in the keypad. The action is invoked server-side and as argument you get the value which the user put in the keypad client-side. You can set the title, subtitle and even control if the input in the field will be asterisks for cases where the player would be typing a pin etc.
The entire keypad requires no CEF at all, and no web related dependencies. Instead the whole thing is defined and rendered using native GTA:V UI elements.
Getting started
To get started put the keypad.js in your client folder and remember to include it in the index.js. Then grab the KeypadLibrary.cs and put it in your server project. With this you are ready to create keypads wherever you need them. Invoke the following function:
StartKeypadForPlayer(Player player, string title, string subTitle, bool useAsterisk, Action<Player,int> callback) as such:
KeypadLibrary.StartKeypadForPlayer( ply, "Withdraw", $"Current bank balance: ~g~${ply.cash}", false, (ply, x) => { ply.SendChatMessage("You are withdrawing: " + x); }); The system supports all native colors from GTA:V so you can color the title and subtitle if needed.
Here's the GitHub link for those interested https://github.com/Andreas1331/ragemp-keypad
84 downloads
(0 reviews)0 comments
Submitted
-
Agreement / Contract API (NodeJS)
By umutbicer
Hi guys!
A function works when the contract is accepted by everyone.
I tried to write similar to root's inventory-api.
Contact me! If you want to change something
Please Download from Github.
https://github.com/QueennN/AgreementAPI
!!!VERY IMPORTANT NOTICE!!! Using player.id is not a reliable way while the agreement is active(not signed), the player can leave the game and player.id can be changed. For this reason, you should use a unique id. For example, database id.My database is player.charid.You have to change player.charid .!!!! You can change 'playerLogin' event too. Its my auth event. EXAMPLE:
addAgreement("key","name","desc",acceptFunction()=
aS.addAgreement('spawn',"Spawn ","perfect desc",(data,chars)=>{ for(let cid in chars){ let players=mp.players.toArray().filter(p=>p.charid==cid) for(let i in players){ players[i].position=data } } }) player.createAgreement("key" , [player-uniqid list] , time , data)
player.createAgreement("spawn",[player.charid],55,{x:56,y:98,z:100}) player.signAgreement(activeAgreemnts Index,decision)
player.signAgreement(index,true)42 downloads
-
RageMP ReactJS Example
By nbank
Hey,
long time ago i created this example how to use ReactJS with its not perfect but if u want to know how this could work u can look in the code.
https://github.com/NoelBank/ragemp-react-example
36 downloads
(0 reviews)0 comments
Submitted
