15.11.2017, 10:46
Quote:
You simply create a global variable as [MAX_ACTORS] and when you SetAnim for an actor, you set that variable for that actorid to true, or to 1. When the actor finishes serving someone, you set it back to false, or to 0. And when someone interacts with an actor, you check if that actorid's variable is false or true, 0 or 1. If it's false, then for example the actor is not busy, and allows the interaction. If it's 1 or true, then the actor is busy and send that message to him.
|
Quote:
He pretty much explained it anyway but I'll try. (Sorry for any typos I'm on tab.)
Code:
new actorbusy[MAX_ACTORS]; // at top of your script with other variables CMD:shoemaker(playerid, params[]) { if(actorbusy[playerid] == 1) return SendClientMessage(playerid, -1, "Actor Is Busy."); // do your stuff here, applying anim and whatever. While doing that make sure to set this variable to 1 actorbusy[playerid] = 1; // When your actor finishes the job you can set it back to 0. |