Player Class Selection in a vehicle
#1

Hi, I've seen somewhere a server where, when the player is choosing his class he is on a bike (NRG-500) as passenger and a npc is driving it. And what about the camera will it follow the npc or no ?
Please help me to do this, Thanks in advance. (I have already npc-s in my server).
Reply
#2

Bump!
Reply
#3

I'm not entirely sure how did they do this, but simply PutPlayerInVehicle should work, assuming you know how to add a NPC driving a NRG.
Reply
#4

I guess if you do Spectatenpc in your OnPlayerConnect function or setcameraposition/face(npc,x,y,z) something like that
Reply
#5

First u need to script the npc and create a class selection for when the player spawns :/ its alot to explain but let me see how best i can break it down:

Create A Npc riding a nrg

Then u need to spawn the player toogle there cotroller off when they spawn send them to a custom made then run a respawn that sets the controller usable again

In the custom class selection:
you need to put the player in the vehicle and let him ride around with the npc and set a camera to follow him around where the npc goes and there u go ur done

PS: simpler explained than done
Reply
#6

Quote:
Originally Posted by Lz
Посмотреть сообщение
I guess if you do Spectatenpc in your OnPlayerConnect function or setcameraposition/face(npc,x,y,z) something like that
So it won't be on OnplayerConenct it will be at OnPlayerRequestClass and SetPlayerCameraPos will set a camera which will stay only at the (x,y,z) position i.e. it won't move.( I guess)
Reply
#7

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
First u need to script the npc and create a class selection for when the player spawns :/ its alot to explain but let me see how best i can break it down:

Create A Npc riding a nrg

Then u need to spawn the player toogle there cotroller off when they spawn send them to a custom made then run a respawn that sets the controller usable again

In the custom class selection:
you need to put the player in the vehicle and let him ride around with the npc and set a camera to follow him around where the npc goes and there u go ur done

PS: simpler explained than done
Ok, but that in that class selection the npc was driving around all cities. (I think the gamemode of the server was troy's freeroam, actually that was 2 years ago)
Reply
#8

Dafuq! It was easier than I thought I just removed all cameras and etc. and I've added PutPlayerInVehicle(playerid, vehicleid, seatpos);
Reply
#9

What if there are more than 1 users selecting class? For this you will have to make NPCs for each and every person who is currently using the class selection.
Reply
#10

Quote:
Originally Posted by Faisal_khan
Посмотреть сообщение
What if there are more than 1 users selecting class? For this you will have to make NPCs for each and every person who is currently using the class selection.
Hm, I didn't think about that. Are you sure that this will happen ?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)