veers
Members-
Posts
19 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Downloads
Everything posted by veers
-
library V-RPC - A GTAV multiplayer RPC library
veers replied to TheMysteriousVincent's topic in Resources
I got it to work. Thanks. Is there any way to force the script to wait for the promise to get the value?- 13 replies
-
- 1
-
-
library V-RPC - A GTAV multiplayer RPC library
veers replied to TheMysteriousVincent's topic in Resources
The folder path is: RAGEMP/server-files/node_modules/@eisengrind/v-rpc/ragemp There is no server error, but the game can't find the client callServerSync function. Do i have to copy the v-rpc/ragemp/client folder somewhere else too?- 13 replies
-
library V-RPC - A GTAV multiplayer RPC library
veers replied to TheMysteriousVincent's topic in Resources
I copied the @eisengrind folder into the client_packages as well but it said "vrpc.callServerSync is not a function"- 13 replies
-
library V-RPC - A GTAV multiplayer RPC library
veers replied to TheMysteriousVincent's topic in Resources
To return a value i need to use sync? When to use async?- 13 replies
-
library V-RPC - A GTAV multiplayer RPC library
veers replied to TheMysteriousVincent's topic in Resources
I got the "require" part but i don't know how to use it in script. Please write a script example.- 13 replies
-
- 1
-
-
library V-RPC - A GTAV multiplayer RPC library
veers replied to TheMysteriousVincent's topic in Resources
And how to use?- 13 replies
-
- 1
-
-
player.call("phone:callbackNumber", [number]); [] was missing!
-
Could anyone do anything useful with createMissionTrain command? I wanted to do train traffic but i don't think that's possible with clientside.
-
And why createMissionTrain is a client-side command, not server-side?
-
But why works only with mp.game.invoke?
-
My experiments: You can't use integer for speed. 3.7, 3.8, 3.9 works but 4.0 not. 4.1, 4.2 ... 4.9 works but 5.0 not etc.
-
Still getting "is not function" error. mp.events.add("playerCommand", (command) => { const args = command.split(/[ ]+/); const commandName = args[0]; args.shift(); if (commandName === "train") { if(!mp.game.streaming.hasModelLoaded(mp.game.joaat("freight"))) mp.game.streaming.requestModel(mp.game.joaat("freight")); while(!mp.game.streaming.hasModelLoaded(mp.game.joaat("freight"))) mp.game.wait(0); if(!mp.game.streaming.hasModelLoaded(mp.game.joaat("freightcar"))) mp.game.streaming.requestModel(mp.game.joaat("freightcar")); while(!mp.game.streaming.hasModelLoaded(mp.game.joaat("freightcar"))) mp.game.wait(0); if(!mp.game.streaming.hasModelLoaded(mp.game.joaat("freightgrain"))) mp.game.streaming.requestModel(mp.game.joaat("freightgrain")); while(!mp.game.streaming.hasModelLoaded(mp.game.joaat("freightgrain"))) mp.game.wait(0); if(!mp.game.streaming.hasModelLoaded(mp.game.joaat("freightcont1"))) mp.game.streaming.requestModel(mp.game.joaat("freightcont1")); while(!mp.game.streaming.hasModelLoaded(mp.game.joaat("freightcont1"))) mp.game.wait(0); if(!mp.game.streaming.hasModelLoaded(mp.game.joaat("freightcont2"))) mp.game.streaming.requestModel(mp.game.joaat("freightcont2")); while(!mp.game.streaming.hasModelLoaded(mp.game.joaat("freightcont2"))) mp.game.wait(0); if(!mp.game.streaming.hasModelLoaded(mp.game.joaat("freighttrailer"))) mp.game.streaming.requestModel(mp.game.joaat("freighttrailer")); while(!mp.game.streaming.hasModelLoaded(mp.game.joaat("freighttrailer"))) mp.game.wait(0); const speed = 5.0; train = mp.game.vehicle.createMissionTrain(15, 2693.93408203125, 3067.782958984375, 41.46901321411133, false); mp.game.invoke('0xAA0BC91BE0B796E3', train, speed); mp.game.invoke('0x16469284DB8C62B5', train, speed); train.setTrainSpeed(speed); train.setTrainCruiseSpeed(speed); } }); I don't know what can be the problem.
-
Type error: setTrainSpeed is not a function.
-
But mp.events.add is client-side, mp.events.addCommand is server-side.
-
So anyone could help with vehicle.setTrainSpeed error?
-
Train models have to be loaded before you use the script command. mp.game.streaming.requestModel(mp.game.joaat("freight")); mp.game.streaming.requestModel(mp.game.joaat("freightcar")); mp.game.streaming.requestModel(mp.game.joaat("freightgrain")); mp.game.streaming.requestModel(mp.game.joaat("freightcont1")); mp.game.streaming.requestModel(mp.game.joaat("freightcont2")); mp.game.streaming.requestModel(mp.game.joaat("freighttrailer"));
-
I solved the problem but there is another one. When i try to use the 'vehicle.setTrainSpeed' script command i get an error that 'vehicle.setTrainSpeed' is not a function. I do not know how to stop the train. What's the problem with that command?
-
mp.events.add("playerCommand", (command) => { const args = command.split(/[ ]+/); const commandName = args[0]; args.shift(); if (commandName === "train") { mp.game.vehicle.createMissionTrain(15, 1838.1046142578125, 3528.820556640625, 38.384864807128906, true); } });
-
Hi! The createMissionTrain command crashes the server. I don't know if it's my fault or the command's.
