SA-MP Forums Archive
0.3a Lock? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 0.3a Lock? (/showthread.php?tid=151582)



0.3a Lock? - Antonio [G-RP] - 31.05.2010

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


Re: 0.3a Lock? - russo666 - 31.05.2010

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


Re: 0.3a Lock? - Antonio [G-RP] - 31.05.2010

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;
}



Re: 0.3a Lock? - russo666 - 31.05.2010

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


Re: 0.3a Lock? - Antonio [G-RP] - 31.05.2010

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


Re: 0.3a Lock? - russo666 - 31.05.2010

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.


Re: 0.3a Lock? - Grim_ - 31.05.2010

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
}



Re: 0.3a Lock? - Antonio [G-RP] - 31.05.2010

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


Re: 0.3a Lock? - Grim_ - 31.05.2010

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.


Re: 0.3a Lock? - Antonio [G-RP] - 31.05.2010

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?