Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward Curar();
- public Curar()
- {
- foreach(new i : Player)
- {
- if(JugadorLogeado[i] == 1)
- {
- if(Curando[i] == 1)
- {
- new Float:health;
- GetPlayerHealth(i,health);
- if(health >= 60)
- {
- Curando[i] = 0;
- EstablecerVida(i, 60);
- SetTimerEx("ApareceHospital2", 1000, false, "d", i);
- }
- else
- {
- EstablecerVida(i, health+2.0);
- }
- }
- ////////////////////////////////////////////////////////////////////////////////
- /* ANTI AIRBREAK */
- new Float:Pos[3];
- GetPlayerPos(i,Pos[0],Pos[1],Pos[2]);
- /*if(GetPlayerPos(i,Pos[0],Pos[1],Pos[2]))
- {
- if(GetPlayerState(i) == PLAYER_STATE_ONFOOT || (GetPlayerState(i) == PLAYER_STATE_DRIVER && GetPlayerSpeed(i,true)<10))
- {
- 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
- if(var >= 500 && var <= 1500)
- {
- SendClientMessage(i,-1,"AIRBREAK");
- }
- }
- }*/
- ABPos[i][0] = Pos[0];
- ABPos[i][1] = Pos[1];
- ABPos[i][2] = Pos[2];
- TiempoAB[i] = GetTickCount();
- /* ANTI TELEPORT */
- new Float:Distancia = GetPlayerDistanceFromPoint(i,PosJugador[i][0],PosJugador[i][1],PosJugador[i][2]);
- if(!IsPlayerInAnyVehicle(i))
- {
- if(Distancia > 100 && TimerTP[i] < gettime())
- {
- new string[250];
- format(string,sizeof(string),"*[PRUEBA] TELEPORT - Jugador: %s (ID:%d) - Distancia: %f - Nivel: %d",NombreJugador(i),i,Distancia,GetPlayerScore(i));
- for(new i2, j2 = GetPlayerPoolSize() ;i2 <= j2;i++)
- {
- if(PlayerInfo[i2][jAdminNvl] > ModJuego1 && VerAdmin[i2] == 1) Mensaje(i2,COLOR_SERVER,string);
- }
- }
- }
- else if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
- {
- if(Distancia > 100 && TimerTP[i] < gettime() && !IsPlayerInTransfender(i) && GetPlayerInterior(i) == 0)
- {
- new string[250];
- format(string,sizeof(string),"*[PRUEBA] TP VEHICLE - Jugador: %s (ID:%d) - Distancia: %f - Nivel: %d",NombreJugador(i),i,Distancia,GetPlayerScore(i));
- for(new i2, j2 = GetPlayerPoolSize() ;i2 <= j2;i++)
- {
- if(PlayerInfo[i2][jAdminNvl] > ModJuego1 && VerAdmin[i2] == 1) Mensaje(i2,COLOR_SERVER,string);
- }
- }
- }
- PosJugador[i][0] = Pos[0];
- PosJugador[i][1] = Pos[1];
- PosJugador[i][2] = Pos[2];
- ////////////////////////////////////////////////////////////////////////////////
- }
- }
- for(new v, f = GetVehiclePoolSize(); v <= f; v++)
- {
- if(GetVehicleModel(v) > 0 && ConductorVehiculo(v) != INVALID_PLAYER_ID)
- {
- if(ObtenerVelocidadVehicle(v) >= 350)
- {
- SetVehicleVelocity(v,0,0,0);
- SendClientMessageToAll(-1,"Un vehiculo sobrepaso 350 ");
- }
- new Float:Vida;
- GetVehicleHealth(v,Vida);
- if(Vida != VehicleVida[v])
- {
- CallRemoteFunction("OnVehicleHealthChange","iff",v,Vida,VehicleVida[v]);
- VehicleVida[v] = Vida;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement