06.07.2012, 09:12
nice one
I already changed max players to my slot amount
Quote:
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; } } } } } |
