Locked vehicles
#1

Hey, I've been trying to script a system which spawns locked vehicles, depending on their ID. I tried using SetVehicleParamsForPlayer in the callbacks OnVehicleStreamIn and OnVehicleStreamOut, but they still are unlocked. Anyone knows what's wrong?
Thanks!
Reply
#2

Check this out : https://sampforum.blast.hk/showthread.php?tid=363742

It may helps.

Reply
#3

I understand the code and everything, but I'd like not to use GetPlayerVehicleID since the cars should be locked as soon as they spawn, without needing to check the player's seat or if they're inside a car or not. Oh and also without an ownership system, just spawn locked vehicles. Thanks!
Reply
#4

So call this CallBack :

PHP код:
public OnVehicleSpawn(vehicleid)
{
    return 
1;

Reply
#5

Quote:
Originally Posted by KillerDVX
Посмотреть сообщение
So call this CallBack :

PHP код:
public OnVehicleSpawn(vehicleid)
{
    return 
1;

So make the SetVehicleParamsForPlayer in this callback right?
Reply
#6

Quote:
Originally Posted by aalbero99
Посмотреть сообщение
So make the SetVehicleParamsForPlayer in this callback right?
exactly
Reply
#7

Quote:
Originally Posted by Maximun
Посмотреть сообщение
exactly
Done it, but I get an error saying that playerid is undefined, yet it's one of the needed parameters.
Reply
#8

PHP код:
public OnVehicleSpawn(vehicleid

    for(new 
0MAX_PLAYERSi++)
    {
          
//use your script here with (playerid = i)
    
}
    return 
1

tries like that
Reply
#9

Quote:
Originally Posted by Maximun
Посмотреть сообщение
PHP код:
public OnVehicleSpawn(vehicleid

    for(new 
0MAX_PLAYERSi++)
    {
          
//use your script here with (playerid = i)
    
}
    return 
1

tries like that
Nothing :/ also tried with SetVehicleParamsCarDoors, didn't work either.
Reply
#10

Does anyone know another way to do it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)