[Help]Private Cars
#1

Hello,

First of all i want to tell you that I've tried most private car tutorials and non of them seem to work.


I wan't it so that when the player enter's it reads the name and if it isn't a designated name it ejects them out of it.
These vehicles will be placed around the map at where the player want's, <-- I know how to create it spawning where the player wants


I use:

DCMD
sccanf2
y_ini
streamer
Dini

Thanks for the help

~RevolutionLite
Reply
#2

You can't ask someone to script for you in this section.
Reply
#3

Quote:
Originally Posted by WoodPecker
Посмотреть сообщение
You can't ask someone to script for you in this section.
I'm not, I'm asking for HELP. Like what to use and how to start. That's not scripting for someone. It's giving useful tips
Reply
#4

https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle
or: https://sampwiki.blast.hk/wiki/OnPlayerStateChange

https://sampwiki.blast.hk/wiki/RemovePlayerFromVehicle

Then something like "new privatecar[MAX_VEHICLES];" (= playerid).

OnPlayerEnterVehicle:
if(privatecar[vehicleid] == playerid) -> Everything is okey, else -> RemovePlayerFromVehicle

OnPlayerStateChange:
if (newstate == PLAYER_STATE_DRIVER)
-> if(privatecar[vehicleid] == playerid) -> Everything is okey, else -> RemovePlayerFromVehicle

Notes:
- Only for the driver or for both (driver and passengers)? -> See wiki (ispassenger,states)
- OnPlayerEnterVehicle only works if you "press f (or another key)", but if you get teleported into the car it doesnt work!)
Reply
#5

Quote:
Originally Posted by Kevin54321
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle
or: https://sampwiki.blast.hk/wiki/OnPlayerStateChange

https://sampwiki.blast.hk/wiki/RemovePlayerFromVehicle

Then something like "new privatecar[MAX_VEHICLES];" (= playerid).

OnPlayerEnterVehicle:
if(privatecar[vehicleid] == playerid) -> Everything is okey, else -> RemovePlayerFromVehicle

OnPlayerStateChange:
if (newstate == PLAYER_STATE_DRIVER)
-> if(privatecar[vehicleid] == playerid) -> Everything is okey, else -> RemovePlayerFromVehicle

Notes:
- Only for the driver or for both (driver and passengers)? -> See wiki (ispassenger,states)
- OnPlayerEnterVehicle only works if you "press f (or another key)", but if you get teleported into the car it doesnt work!)
Thanks this is what i've been looking for !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)