Please help D: - 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)
+--- Thread: Please help D: (
/showthread.php?tid=482674)
Please help D: -
iOxide - 22.12.2013
Hi, i was wondering how can i detect road sides? I want a system like this > when player is driving on the left side, they will get a wanted stars. They need to drive on the right side of a road.
And another one is, how can i make the Trailer's rear lights turn on automatically whenever a player attach the trailer to their trucks.
Thanks
Re: Please help D: -
Hansrutger - 22.12.2013
Lots of IsPlayerInRangeOfPoint xD
And oh yes:
https://sampwiki.blast.hk/wiki/SetVehicleParamsEx
Re: Please help D: -
iOxide - 22.12.2013
I know how to use vehicle control system, but how do i turn the lights on and off whenever it is attached to the truck? I already made /lightson and /lightsoff commands. It is only working for trucks not trailer.
Re: Please help D: -
ikey07 - 22.12.2013
This path finder will help you.
https://sampforum.blast.hk/showthread.php?tid=292031
if player is more to left side, he is in wrong lane, as pathfinder finds the center of the road.
Re: Please help D: -
CutX - 22.12.2013
Quote:
Originally Posted by iOxide
I know how to use vehicle control system, but how do i turn the lights on and off whenever it is attached to the truck? I already made /lightson and /lightsoff commands. It is only working for trucks not trailer.
|
it appears that the binary code to lightup the trailer is 0001, which equals 1
so you just have to set the lights to 1
example:
PHP код:
new op[7],tr = GetVehicleTrailer(GetPlayerVehicleID(playerid));
GetVehicleParamsEx(tr,op[0],op[1],op[2],op[3],op[4],op[5],op[6]);
SetVehicleParamsEx(tr,op[0],1,op[2],op[3],op[4],op[5],op[6]);//the 3th argument is the one for the lights
so just do that when they attach a trailer to their truck.
Re: Please help D: -
TheOriginal1337 - 22.12.2013
Well, that's gonna be a pain to code.
You could work with gangzones or something like that.