Please help D:
#1

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
Reply
#2

Lots of IsPlayerInRangeOfPoint xD

And oh yes: https://sampwiki.blast.hk/wiki/SetVehicleParamsEx
Reply
#3

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.
Reply
#4

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.
Reply
#5

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.
Reply
#6

Well, that's gonna be a pain to code.
You could work with gangzones or something like that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)