[HELP] Only one player can enter?
#1

How to make that only one player or 10 players can enter interior.. For example if one player types /enter, for other players that try to enter the same location will send message: Someone already entered that interior!
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerInteriorChange
Reply
#3

PHP код:

new bool:in;
CMD:enter(playeridparams[])
{
     if(
in) return SendClientMessage(playerid, -1"Someone in.");
     else
     {
          
in true;
          
//code for interior
     
}
     return 
1;
}
CMD:exit(playeridparams[])
{
     
in false;
     
//code for exit
     
return 1;

Reply
#4

Quote:
Originally Posted by Whatname
Посмотреть сообщение
PHP код:

new bool:in;
CMD:enter(playeridparams[])
{
     if(
in) return SendClientMessage(playerid, -1"Someone in.");
     else
     {
          
in true;
          
//code for interior
     
}
     return 
1;
}
CMD:exit(playeridparams[])
{
          
in false;
          
//code for exit
     
}
     return 
1;

This approach I guarantee will bug, it's not something you should use. Are you trying to make this for a static entrance point or as a dynamic system? There's different approaches for both.
Reply
#5

i know that will bug if player exit from the interior door i just gave an example
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)