some question
#6

Quote:
Originally Posted by asri
Посмотреть сообщение
can you teach me about limit player in room
PHP код:
new totalplayers//This will hold the amount of players in room.
CMD:enterroom(playeridparams[]) //Or whatever command is.
{
    if(
totalplayers == 5//Check if the var "totalplayers" has a value of 5.
        
return scm(playerid, -1"limit reached"); //if yes return and send a msg.
    
totalplayers++; //increase the variable.
    
return 1;
}
CMD:exitroom(playeridparams[])
{
    
totalplayers--; //decrease the variable that holds amount of players in room.
    
return 1;

Reply


Messages In This Thread
some question - by asri - 05.06.2017, 15:58
Re: some question - by Toroi - 05.06.2017, 21:35
Re: some question - by saffierr - 05.06.2017, 21:39
Re: some question - by asri - 07.06.2017, 09:12
Re: some question - by saffierr - 07.06.2017, 09:52
Re: some question - by coool - 07.06.2017, 09:56
Re: some question - by asri - 07.06.2017, 10:08
Re: some question - by saffierr - 07.06.2017, 10:10
Re: some question - by asri - 07.06.2017, 10:20
Re: some question - by saffierr - 07.06.2017, 10:31

Forum Jump:


Users browsing this thread: 1 Guest(s)