Getting the server to detect how many players are on and denying access if there are less than 10...
#1

Hey I've just come back to coding after ages. I am wondering how to make it so when someone does something then a message like this pops up

"There are less than 10 players so this will not be given to you"

I know to do this through sendclientmessage but how do i get it to detect if there are less than 10 players on?
Reply
#2

Код:
new players;
for(new i; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i)) players++;
}
if(players < 10) return SendClientMessage(playerid,COLOR,"There are less than 10 players so this will not be given to you");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)