one question
#4

nice one

Quote:
Originally Posted by papedo
Посмотреть сообщение
At first you should stop use MAX_PLAYERS for loops.

Код:
#define MAX_PLAYERS_EX 50 //change to server slot limit
forward PlaceChecker();
public OnGameModeInit()
{
     SetTimer("PlaceChecker",1000,true);//Start timer
}
public PlaceChecker()
{
     for(new p;p<MAX_PLAYERS_EX;p++)
     {
          if(!IsPlayerConnected(p) || IsPlayerNPC(p))continue; // jump to next ID when OFFLINE or NPC
          new interior = GetPlayerInterior(p);
          switch(interior)
          {
               case 0:// the world
               {
                    if(IsPlayerInArea(p,2440.7849,2414.9807,-1409.5649,-1433.7346))// Enter the place
                    {
                         // ...     
                    }else if(ShitInfo[i][pVehReg])// Leave the place
                    {
                         ShitInfo[i][pVehReg] = 0;
                    }
                    if(IsPlayerInArea(p,x,y,z))// Next place enter..
                    {
                         // ...     
                    }else if(ShitInfo[i][pBank])// NextPlaceLeave
                    {
                         ShitInfo[i][pBank] = 0;
                    }
               }
          }          
     }
}
I already changed max players to my slot amount
Reply


Messages In This Thread
one question - by mineralo - 06.07.2012, 08:45
Re: one question - by Libra_PL - 06.07.2012, 09:02
Re: one question - by papedo - 06.07.2012, 09:11
Re: one question - by mineralo - 06.07.2012, 09:12

Forum Jump:


Users browsing this thread: 1 Guest(s)