Portal Idea [+REP]
#6

This is commonly done visually through textdraws. However, for the server-end you'll need to store information such as the player's current port, etc, and script things they can do according to the information stored. Example:

pawn Код:
enum pPortData
{
    pPort,
    bool: pInsidePort
}

new PortInformation[MAX_PLAYERS][pPortData];
stock GetPlayerPort(playerid) {
    if(PortInformation[playerid][pInsidePort] == true) {
         return PortInformation[playerid][pPort];
    }
    else return 0; // not inside of a port
}

stock ConnectToPort(playerid, port) {
  if(port >= 1 && port < 5)
  {
        PortInformation[playerid][pPort] = port;
        PortInformation[playerid][pInsidePort] = true;
        return 1;
  }
  else return 0; // bad port
}
Reply


Messages In This Thread
Portal Idea [+REP] - by arlindi - 24.04.2015, 15:41
Re: Portal Idea [+REP] - by Azula - 24.04.2015, 15:45
Re: Portal Idea [+REP] - by arlindi - 24.04.2015, 15:46
Re: Portal Idea [+REP] - by Azula - 24.04.2015, 15:50
Re: Portal Idea [+REP] - by arlindi - 24.04.2015, 15:51
Re: Portal Idea [+REP] - by Abagail - 24.04.2015, 15:57
Re: Portal Idea [+REP] - by arlindi - 24.04.2015, 16:00
Re: Portal Idea [+REP] - by arlindi - 24.04.2015, 19:07
Re: Portal Idea [+REP] - by arlindi - 02.05.2015, 08:32
Re: Portal Idea [+REP] - by Mencent - 02.05.2015, 09:27

Forum Jump:


Users browsing this thread: 1 Guest(s)