- public Postos()
- {
- for(new i=0; i<MAX_PLAYERS; i++){
- if(IsPlayerConnected(i)) {
- if(PlayerToPoint(7.0, i, 70.4532,1219.1954,18.8117) || PlayerToPoint(7.0, i, -90.2719,-1169.9579,2.3964) || PlayerToPoint(7.0, i, -2411.5728,976.1896,45.4609) || PlayerToPoint(7.0, i, 2114.8413,919.9194,10.8203)){//Fort Carson
- GameTextForPlayer(i," ~n~ ~w~Posto ~y~Petobras ~r~/abastecer",3000,4);
- AreaPosto[i] = 1;
- } else {
- if(AreaPosto[i] == 1){
- AreaPosto[i] = 0;
- }
- if (PlayerToPoint(7.0, i, 2638.9553,1107.1788,10.8203) || PlayerToPoint(7.0, i, 1595.6233,2199.6162,10.8203) || PlayerToPoint(7.0, i, 1940.8671,-1773.2283,13.3906) || PlayerToPoint(5.0, i, -2243.8435,-2560.5598,31.9219)){//Posto LV
- GameTextForPlayer(i," ~n~ ~w~Posto ~y~Shell ~r~/abastecer",3000,4);
- AreaPosto[i] = 1;
- } else {
- if(AreaPosto[i] == 1){
- AreaPosto[i] = 0;
- }
- if (PlayerToPoint(7.0, i, 1382.3647,459.0785,20.3452) || PlayerToPoint(8.0, i, -1675.4781,413.1594,7.1797) || PlayerToPoint(7.0, i, 655.5922,-565.3943,16.3359) || PlayerToPoint(7.0, i, -1606.3616,-2713.5872,48.5335)){//Posto LS/SF
- GameTextForPlayer(i," ~n~ ~w~Posto ~y~Ipiranga ~r~/abastecer",3000,4);
- AreaPosto[i] = 1;
- } else {
- if(AreaPosto[i] == 1){
- AreaPosto[i] = 0;
- }
- if(IsPlayerInPlace(i,576.3771, 1662.789, 619.3304, 1709.206) || PlayerToPoint(7.0, i, 1004.1403,-937.8801,42.1797) || PlayerToPoint(7.0, i, 2202.1230,2476.8582,10.8203) || PlayerToPoint(6.0, i, 417.2369,-1912.7708,1.5641)){//Posto acima FC
- GameTextForPlayer(i," ~n~ ~w~Posto ~y~Texaco ~r~/abastecer",3000,4);
- AreaPosto[i] = 1;
- } else {
- if(AreaPosto[i] == 1){
- AreaPosto[i] = 0;
- }
- new string[128];
- GetPlayerPos(i, PlayerCurrentPos[0], PlayerCurrentPos[1], PlayerCurrentPos[2]);
- if(!floatcmp(PlayerCurrentPos[0], PlayerLastPos[i][LastX]) && !floatcmp(PlayerCurrentPos[1], PlayerLastPos[i][LastY]))
- {
- PlayerAfkTicks[i] ++;
- }
- else
- {
- PlayerAfkTicks[i] = 0;
- }
- PlayerLastPos[i][LastX] = PlayerCurrentPos[0];
- PlayerLastPos[i][LastY] = PlayerCurrentPos[1];
- PlayerLastPos[i][LastZ] = PlayerCurrentPos[2];
- if(PlayerAfkTicks[i] == MAX_IDLE_TIME*300)
- {
- AFK[i]= 1;
- GetPlayerName(i, playername, MAX_PLAYER_NAME);
- format(string, sizeof(string), "| ANTI - AFK | %s foi bloqueado de upar, por ficar ausente por muito tempo!", playername);
- SendClientMessage(i, 0x930093AA, string);
- SetCameraBehindPlayer(i);
- TogglePlayerControllable(i,0);
- KillTimer(timer12[i]);
- TextDrawShowForPlayer(i,AfkText);
- TextDrawShowForPlayer(i,AfkBackText);
- TextDrawShowForPlayer(i,topblack);
- TextDrawShowForPlayer(i,bottomblack);
- }
- }
- }
- }
- }
- }
- }
- }