Animation doesn't works for each players


#1

Hi,

I made a banker who should raises his hands if player shoot inside the bank, but I meet a lot of problems:

This his how I created the ped:

	Banker = CreatePed(4, 0xC306D6F5, -112.298, 6471.095, 30.640, 133.880, true, false)

I set the first bool as true.

Now, this is my script when you are shooting in bank:

if (IsPedShootingInArea(GetPlayerPed(-1), -118.478, 6469.627, 35.00, -102.495, 6465.237, 25.00, 0, 0) or IsPedShootingInArea(GetPlayerPed(-1), -118.478, 6469.627, 35.00, -104.963, 6479.260, 25.00, 0, 0) ) then
TaskHandsUp(Banker, 4000, Banker, -1, true)
sendnotif(tostring("~r~Vous avez lancé un braquage. La police est prévenue."))
end

The first problem is if the first bool of createPed is true, the same ped spawn for each spawned players (so if there are 3 players, there are 3 same peds…). And if a player start the script, the banker raises his hands but the other players can’t start the script ( GetPlayerPed(-1) never change his result, it staying on the first player…).

So I tried to put the first bool of createPed at false, everyone can start the script but the animation doesn’t works for each other.

How can I corrected that? How server sided an animation or diffuse it to everyone…?
I’m stuck with my script since 3 days but I wont give up. I’m looking for the savior please

Thank you