Posts: 2,027
Threads: 139
Joined: Jul 2010
Reputation:
0
say if you did something like
new veh;
veh = createvehicle blabla
then
some onplayerkeystatechange stuff
then
if veh = true
showplayertextdraw?
im sure its something like that, just im tryna fix loads of my n00b errors D:
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
if(vehicle) will return true if it's not 0 (obviously).
Posts: 527
Threads: 6
Joined: Jul 2010
Reputation:
0
Can you explain a bit more what your problem is and what do you want to make?
Posts: 1,501
Threads: 19
Joined: Nov 2007
Reputation:
0
Are you asking if this is possible or what? It's pretty much just how you showed it. Pseudocode wise anyways.
Posts: 527
Threads: 6
Joined: Jul 2010
Reputation:
0
Check your server package and fsdebug.pwn
You'll find everything there =)
Posts: 527
Threads: 6
Joined: Jul 2010
Reputation:
0
What part is confusing you?
Posts: 2,027
Threads: 139
Joined: Jul 2010
Reputation:
0
the fact that it shows me nothing about changing states with the camera..
Posts: 2,628
Threads: 32
Joined: Apr 2007
Reputation:
0
Ok, first of all you need to find a good spot for your camera to be placed.
Get the coords for the position, and use SetCameraPos + TogglePlayerControllable to freeze the player and look at the cars.
Spawn the first car in the line with CreateVehicle and show a textdraw for the player (which obviously already is made under OnGameModeInit).
Use variables to declare if player is scrolling through vehicles, and if he is (variable = true), use OnPlayerKeyStateChange to change vehicle (DestroyVehicle, CreateVehicle) and of course the textdraw (TextDrawHideForPlayer, TextDrawSetString, TextDrawShowForPlayer).
As Ironboy said, fsdebug includes this type of function, so you should really look it up and learn from it.
Good luck :]