Repeating sequence formation.
#1

Hi.
how can I do a particular sequence ?
Example:
Sequence -1
Player 1 connect and spawn 1. pos
Player 2 connect and spawn 2. pos
...
Player 5 connect and spawn 5. pos

Sequence -2
Player 6 connect and spawn 1. pos
Player 7 connect and spawn 2. pos
...
Player 10 connect and spawn 5. pos
Reply
#2

You can use modulo operation but it would give 0 instead of 5 so we set it again if that's the case:
pawn Код:
new spawn_number;
if (!(spawn_number = playerid % 5)) spawn_number = 5;
Reply
#3

If you want to solely base it on the playerid, you can simply do:

pawn Код:
spawn = playerid % 5;
Although that may be too predictable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)