15.11.2018, 15:35
AFAIK NPCs aren't able to drive by at all. If you record yourself drive by-ing in a car and playback the recording using SAMP's NPC functions, it also won't happen (this suggests it's a SAMP NPC limit).
I tried to do something similar a while back and couldn't get them to even lean out the window. Maybe you can do something using animations and Bullet Data, but that would be rather experimental.
What I did as a workaround was change the vehicle to something with space on its back, like a Bobcat or other Pickup Truck.
Then I create an on-foot NPC and attached it to the vehicle. So the NPC was standing on the back of the car and from there it's able to shoot other people.
If you want to try that, you can use these functions:
It looks quite cool too. I had 4 NPCs on my roof with Miniguns, shooting everyone in range
I tried to do something similar a while back and couldn't get them to even lean out the window. Maybe you can do something using animations and Bullet Data, but that would be rather experimental.
What I did as a workaround was change the vehicle to something with space on its back, like a Bobcat or other Pickup Truck.
Then I create an on-foot NPC and attached it to the vehicle. So the NPC was standing on the back of the car and from there it's able to shoot other people.
If you want to try that, you can use these functions:
Код:
FCNPC_SetSurfingVehicle(npcid, vehicleid); FCNPC_SetSurfingOffsets(npcid, Float:x, Float:y, Float:z);