[HELP] Limited workers in one job
#1

Hey, i wan't to make that maximum 20 player's can work in one job. like job workers limit, is it possible?
Reply
#2

Everything's possible.
Код:
new PeoplesInPD;
Then, the player takes job, put this function:
Код:
PeoplesInPD++;
And, of course check how much is in PD. For example:
Код:
if(PeoplesInPD == 20)
{
SendClientMessage(playerid,0xFF0000FF,"In our Police Department is enough police officers. Sorry.");
return 1;
}
Reply
#3

ok thanks! one more question, how could i make an score system, like a people every 60 seconds gets +1 score. but only if they are moving not afk or something like this.
Reply
#4

and how could i make when player quit's job, there will be free worker space.

and is there a solution for this problem, when player joins job. and he leaves server. the character is still in this job, i want to make it leave automaticly if you are not active.
Reply
#5

Quote:
Originally Posted by addinol
ok thanks! one more question, how could i make an score system, like a people every 60 seconds gets +1 score. but only if they are moving not afk or something like this.
Make timer.

Quote:

and how could i make when player quit's job, there will be free worker space.

Код:
PeopleInPD--;
Reply
#6

oh thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)