Car Lock Bug? [0.3c R2-2, R3] -
Killa[DGZ] - 07.12.2010
Hey im not sure whats wrong here its just popped up from nowhere...
[ame]http://www.youtube.com/watch?v=PoYHY55PcTg[/ame]
i use, SetVehicleParamsForPlayer for my vehicle locks under OnVehicleStreamIn(vehicleid, forplayerid)
can anyone else do this when the car is locked and it has a driver?
Re: Car Lock Bug? [0.3c R2-2, R3] -
Macluawn - 07.12.2010
Its a samp bug. add this somewhere in your code, it should fix it.
Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (GetPlayerSurfingVehicleID(playerid) == vehicleid) ClearAnimations(playerid);
return 1;
}
Re: Car Lock Bug? [0.3c R2-2, R3] -
Killa[DGZ] - 07.12.2010
Quote:
Originally Posted by Macluawn
Its a samp bug. add this somewhere in your code, it should fix it.
Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (GetPlayerSurfingVehicleID(playerid) == vehicleid) ClearAnimations(playerid);
return 1;
}
|
Wow thx Macluawn, that actually looks like it would fix my problem
EDIT: It worked great thanks again Macluawn!
Re: Car Lock Bug? [0.3c R2-2, R3] -
beckzy - 07.12.2010
AFAIK if you use ClearAnimations it will stop you from entering, but other players will still see you enter. Well this was the case in 0.3a and before but I don't think it was ever fixed.
Re: Car Lock Bug? [0.3c R2-2, R3] -
Killa[DGZ] - 08.12.2010
Quote:
Originally Posted by BeckzyBoi
AFAIK if you use ClearAnimations it will stop you from entering, but other players will still see you enter. Well this was the case in 0.3a and before but I don't think it was ever fixed.
|
yes that is true, so after lots of testing and mucking about i came up with this.
its not perfect but it seems my best solution atm.
Code:
}
//------------------------------------------------------------------------------------------------------
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (GetPlayerSurfingVehicleID(playerid) == vehicleid)
{
ClearAnimations(playerid);
new Float:slx, Float:sly, Float:slz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz+0.1);//good results with this
}
Re: Car Lock Bug? [0.3c R2-2, R3] -
GaGlets(R) - 08.12.2010
Quote:
Originally Posted by Killa[DGZ]
//------------------------------------------------------------------------------------------------------
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (GetPlayerSurfingVehicleID(playerid) == vehicleid)
{
ClearAnimations(playerid);
new Float  lx, Float  ly, Float  lz;
GetPlayerPos(playerid, slx, sly, slz);
SetPlayerPos(playerid, slx, sly, slz+0.1);//good results with this
}
[/code]
|
Ar you serious, this would give more lags than simple ClearAnimation, if reciever have slow connection..
Re: Car Lock Bug? [0.3c R2-2, R3] -
The_Moddler - 08.12.2010
Quote:
Originally Posted by GaGlets®
Ar you serious, this would give more lags than simple ClearAnimation, if reciever have slow connection..
|
Why lag?
It just sets the player pos.. lol.
Re: Car Lock Bug? [0.3c R2-2, R3] -
Killa[DGZ] - 08.12.2010
thats right moddler It just clears the animation and sets the player back on top of the car, there is no lag in that.
Though sometimes you may see the player enter as passenger for a split second (car stops - player exits) problem solved good enough for me!