0.3a Lock?
#1

Okay, well I noticed that SetVehicleParamsForPlayer doesn't work in 0.3a, how do I fix it?
Reply
#2

On wiki it's explained: https://sampwiki.blast.hk/wiki/SetVehicleParamsForPlayer
Reply
#3

Alright, I have this function on my script..

But the lock still wont work.

pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
SetVehicleParamsForPlayer(vehicleid, forplayerid, iVehicleObjective[vehicleid][0], iVehicleObjective[vehicleid][1]);
}

stock SetVehicleParamsForPlayerEx(vehicleid, playerid, objective, doorslocked)
{
SetVehicleParamsForPlayer(vehicleid, playerid, objective, doorslocked);
iVehicleObjective[vehicleid][0] = objective;
iVehicleObjective[vehicleid][1] = doorslocked;
}
Reply
#4

Today is not a good day for help (my life ended) but try to use a loop instead of 'playerid'.
Reply
#5

How will the loop help? Its only locking for a certain player.
Reply
#6

Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
How will the loop help? Its only locking for a certain player.
Yeah your right. I'm fucked up today, sorry lal.

Tomorrow after i sleep i'll take a look.
Reply
#7

Quote:
Originally Posted by russooooo
Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
How will the loop help? Its only locking for a certain player.
Yeah your right. I'm fucked up today, sorry lal.

Tomorrow after i sleep i'll take a look.
So cool dude.

Anyway, whats up with all of that extra code? Just do it manually;
pawn Код:
public OnVehicleStreamedIn(vehicleid, forplayerid)
{
  SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1); // Locks doors without arrow above it
}
Reply
#8

Wait so how now do I lock the vehicle after adding those codes?
Reply
#9

Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
Wait so how now do I lock the vehicle after adding those codes?
The code I just did does lock the vehicle.
Reply
#10

Quote:
Originally Posted by Grim_
Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
Wait so how now do I lock the vehicle after adding those codes?
The code I just did does lock the vehicle.
So I add

pawn Код:
public OnVehicleStreamedIn(vehicleid, forplayerid)
{
  SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1); // Locks doors without arrow above it
}
Then OnVehicleStreamedIn(vehicleid, forplayer) and it will lock the car?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)