18.05.2018, 18:42
Hi, I have installed the system at the server (https://sampforum.blast.hk/showthread.php?pid=3945923#pid3945923) , but other actors are also being robbed, how can we solve this problem ?
new actorid = GetPlayerCameraTargetActor(playerid);
if(actorid == INVALID_ACTOR_ID)
if(actorid == INVALID_ACTOR_ID || !robbery_data[actorid][actor_created])
return 1;
if(gettime() - robbery_data[actorid][actor_robbedRecently] < 60 * ROBBERY_WAIT_TIME)
return OnPlayerStartRobbery(playerid, actorid, 1);
robbery_data[actorid][actor_robbedRecently] = gettime();
RunActorAnimationSequence(playerid, actorid, 0);
}
|
The problem lies on line 240 of the robbery include.
Код:
new actorid = GetPlayerCameraTargetActor(playerid);
if(actorid == INVALID_ACTOR_ID)
if(actorid == INVALID_ACTOR_ID || !robbery_data[actorid][actor_created])
return 1;
if(gettime() - robbery_data[actorid][actor_robbedRecently] < 60 * ROBBERY_WAIT_TIME)
return OnPlayerStartRobbery(playerid, actorid, 1);
robbery_data[actorid][actor_robbedRecently] = gettime();
RunActorAnimationSequence(playerid, actorid, 0);
}
|