Actor Problem - 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: Actor Problem (
/showthread.php?tid=653987)
Actor Problem -
BrainDamaged - 18.05.2018
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 ?
Re: Actor Problem -
BrainDamaged - 18.05.2018
the problem continues
Re: Actor Problem -
JasonRiggs - 18.05.2018
the "actorid" does that.
Re: Actor Problem -
Pottus - 19.05.2018
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);
}
The include has no internal checking if an actor was actually created by this system. Instead it just uses any valid actorid it finds.
Re: Actor Problem -
BrainDamaged - 19.05.2018
Quote:
Originally Posted by Pottus
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);
}
The include has no internal checking if an actor was actually created by this system. Instead it just uses any valid actorid it finds.
|
Oh god, thank you so much sir, My problem is resolved.