random player
#1

Hi, i have a question.
When the player type the command then server change var to 1(OK), but how to do function which will be random players with this var and after this give them another var ?

Something like:

Someone type command
Server change his var to 1 (ex. player[playerid] = 1)
Now random players with this var on 1 (random)
Server chose 1(one) player with this var and change his to another (ex. player[playerid] = 1 --> player1[playerid] = 1)

I think that's all.

Greetings.
Reply
#2

Random Same basic principle, just like random spawns.
Reply
#3

Sry, but unhelpful post
Reply
#4

Код:
new yourvar[MAX_PLAYERS];

yourvar[random(MAX_PLAYERS)] = 1; //Random id
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)