Sign in to follow this  
theralio

Random Cases

Recommended Posts

Hi,

 

i want to create a Trucking Server and at the moment iam working on the /work command.

I have some Questions.

How do i create Random Cases for Missions?

How do i spawn a Trailer and attach it directly to the Truck?

How do i set the Player to "Work" State? i rly want to work with colshapes

Share this post


Link to post
Share on other sites

If you want to create something 'random' you could use a switch statement and number each job 1,2,3,4,5 etc and run the Random function each time to pick a random job (JS Random Function for example, if you're using C# just google it.)

Never use trailers but I assume, spawn the truck, then spawn the trailer and use this function. Again if you're using C# head to the GTA Network wiki for C# code.

Not sure what you mean by set the player to 'work' state. You can set a variable on the player using 'player.data.variableName' so for example player.data.isWorking and set that to true/false or whatever. I'm just not sure entirely what you need.

 

I highly recommend you look at the wiki as two of these questions could have been answered through using it. https://wiki.rage.mp or for C# it's https://wiki.gtanet.work 

 

Share this post


Link to post
Share on other sites
vor 7 Stunden schrieb MrPancakers:

If you want to create something 'random' you could use a switch statement and number each job 1,2,3,4,5 etc and run the Random function each time to pick a random job (JS Random Function for example, if you're using C# just google it.)

Never use trailers but I assume, spawn the truck, then spawn the trailer and use this function. Again if you're using C# head to the GTA Network wiki for C# code.

Not sure what you mean by set the player to 'work' state. You can set a variable on the player using 'player.data.variableName' so for example player.data.isWorking and set that to true/false or whatever. I'm just not sure entirely what you need.

 

I highly recommend you look at the wiki as two of these questions could have been answered through using it. https://wiki.rage.mp or for C# it's https://wiki.gtanet.work 

 

Thank you so much :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.