Player Class Selection in a vehicle -
x96664 - 27.11.2012
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).
Re: Player Class Selection in a vehicle -
x96664 - 30.11.2012
Bump!
Re: Player Class Selection in a vehicle -
Mmartin - 30.11.2012
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.
Re: Player Class Selection in a vehicle -
Lz - 30.11.2012
I guess if you do Spectatenpc in your OnPlayerConnect function or setcameraposition/face(npc,x,y,z) something like that
Re: Player Class Selection in a vehicle -
Glad2BeHere - 30.11.2012
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
Re: Player Class Selection in a vehicle -
x96664 - 30.11.2012
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)
Re: Player Class Selection in a vehicle -
x96664 - 30.11.2012
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)
Re: Player Class Selection in a vehicle -
x96664 - 30.11.2012
Dafuq! It was easier than I thought I just removed all cameras and etc. and I've added PutPlayerInVehicle(playerid, vehicleid, seatpos);
Re: Player Class Selection in a vehicle -
Faisal_khan - 30.11.2012
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.
Re: Player Class Selection in a vehicle -
x96664 - 30.11.2012
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 ?