Advertisement
EobardHahn

asd

Jan 18th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.19 KB | None | 0 0
  1. forward Curar();
  2. public Curar()
  3. {
  4.     foreach(new i : Player)
  5.     {
  6.         if(JugadorLogeado[i] == 1)
  7.         {
  8.             if(Curando[i] == 1)
  9.             {
  10.                 new Float:health;
  11.                 GetPlayerHealth(i,health);
  12.                 if(health >= 60)
  13.                 {
  14.                     Curando[i] = 0;
  15.                     EstablecerVida(i, 60);
  16.                     SetTimerEx("ApareceHospital2", 1000, false, "d", i);
  17.                 }
  18.                 else
  19.                 {
  20.                     EstablecerVida(i, health+2.0);
  21.                 }
  22.             }
  23. ////////////////////////////////////////////////////////////////////////////////
  24.             /* ANTI AIRBREAK */
  25.             new Float:Pos[3];
  26.             GetPlayerPos(i,Pos[0],Pos[1],Pos[2]);
  27.             /*if(GetPlayerPos(i,Pos[0],Pos[1],Pos[2]))
  28.             {
  29.                 if(GetPlayerState(i) == PLAYER_STATE_ONFOOT || (GetPlayerState(i) == PLAYER_STATE_DRIVER && GetPlayerSpeed(i,true)<10))
  30.                 {
  31.                     new var = (floatround(floatsqroot(GetSquareDistance(Pos[0],Pos[1],Pos[2],ABPos[i][0],ABPos[i][1],ABPos[i][2]))*3600)/(GetTickCount()-TiempoAB[i])); //Detecta la velocidad de posicion a posicion
  32.                     if(var >= 500 && var <= 1500)
  33.                     {
  34.                         SendClientMessage(i,-1,"AIRBREAK");
  35.                     }
  36.                 }
  37.             }*/
  38.             ABPos[i][0] = Pos[0];
  39.             ABPos[i][1] = Pos[1];
  40.             ABPos[i][2] = Pos[2];
  41.             TiempoAB[i] = GetTickCount();
  42.             /* ANTI TELEPORT */
  43.             new Float:Distancia = GetPlayerDistanceFromPoint(i,PosJugador[i][0],PosJugador[i][1],PosJugador[i][2]);
  44.             if(!IsPlayerInAnyVehicle(i))
  45.             {
  46.                 if(Distancia > 100 && TimerTP[i] < gettime())
  47.                 {
  48.                     new string[250];
  49.                     format(string,sizeof(string),"*[PRUEBA] TELEPORT - Jugador: %s (ID:%d) - Distancia: %f - Nivel: %d",NombreJugador(i),i,Distancia,GetPlayerScore(i));
  50.                     for(new i2, j2 = GetPlayerPoolSize() ;i2 <= j2;i++)
  51.                     {
  52.                         if(PlayerInfo[i2][jAdminNvl] > ModJuego1 && VerAdmin[i2] == 1) Mensaje(i2,COLOR_SERVER,string);
  53.                     }
  54.                 }
  55.             }
  56.             else if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  57.             {
  58.                 if(Distancia > 100 && TimerTP[i] < gettime() && !IsPlayerInTransfender(i) && GetPlayerInterior(i) == 0)
  59.                 {
  60.                     new string[250];
  61.                     format(string,sizeof(string),"*[PRUEBA] TP VEHICLE - Jugador: %s (ID:%d) - Distancia: %f - Nivel: %d",NombreJugador(i),i,Distancia,GetPlayerScore(i));
  62.                     for(new i2, j2 = GetPlayerPoolSize() ;i2 <= j2;i++)
  63.                     {
  64.                         if(PlayerInfo[i2][jAdminNvl] > ModJuego1 && VerAdmin[i2] == 1) Mensaje(i2,COLOR_SERVER,string);
  65.                     }
  66.                 }
  67.             }
  68.             PosJugador[i][0] = Pos[0];
  69.             PosJugador[i][1] = Pos[1];
  70.             PosJugador[i][2] = Pos[2];
  71. ////////////////////////////////////////////////////////////////////////////////
  72.         }
  73.     }
  74.     for(new v, f = GetVehiclePoolSize(); v <= f; v++)
  75.     {
  76.         if(GetVehicleModel(v) > 0 && ConductorVehiculo(v) != INVALID_PLAYER_ID)
  77.         {
  78.             if(ObtenerVelocidadVehicle(v) >= 350)
  79.             {
  80.                 SetVehicleVelocity(v,0,0,0);
  81.                 SendClientMessageToAll(-1,"Un vehiculo sobrepaso 350 ");
  82.             }
  83.             new Float:Vida;
  84.             GetVehicleHealth(v,Vida);
  85.             if(Vida != VehicleVida[v])
  86.             {
  87.                 CallRemoteFunction("OnVehicleHealthChange","iff",v,Vida,VehicleVida[v]);
  88.                 VehicleVida[v] = Vida;
  89.             }
  90.         }
  91.     }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement