stock EstaEnAgua(playerid)
{
new Animacion[32], Libreria[32];
GetAnimationName(GetPlayerAnimationIndex(playeid), Libreria, sizeof(Libreria), Animacion, sizeof(Animacion));
if(!strcmp(Libreria, "SWIM", true))
{
return 1;
}
return 0;
}
//
if(EstaEnAgua(playerid))
{
if(EstaEnElEventoASD[playerid] == 1) // Pon tu variable.
{
SpawnPlayer(playerid);
EstaEnElEventoASD[playerid] = 0; // Pon tu variable.
}
}
if(!strcmp(cmdtext, "/derby3", true)) { new Float:health; GetPlayerHealth(playerid,health); if(health >= 70) { EnviarMensaje(playerid,"Derby3"); SetPlayerPos(playerid, 1106.7439,3658.3748,142.6193); SetPlayerVirtualWorld(playerid, 0); SetPlayerInterior(playerid, 16); } else { SendClientMessage(playerid, COLOR_YELLOW, "[ADVERTENCIA] Por favor Llena tu vida antes de usar los TelePorts."); } return 1; } |
// Array global
new TimerDetectWater[MAX_PLAYERS];
// Comando.
if(!strcmp(cmdtext, "/derby3", true))
{
new Float:health;
GetPlayerHealth(playerid, health);
if(health >= 70)
{
EnviarMensaje(playerid, "Derby3");
SetPlayerPos(playerid, 1106.7439, 3658.3748, 142.6193);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 16);
TimerDetectWater[playerid] = SetTimerEx("DetectarAgua", 1000, true, "d", playerid);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "[ADVERTENCIA] Por favor Llena tu vida antes de usar los TelePorts.");
}
return 1;
}
// Funciуn llamada.
forward DetectarAgua(playerid);
public DetectarAgua(playerid)
{
if(EstaEnElEventoASD[playerid] == 1) // Pon tu variable.
{
if(EstaEnAgua(playerid))
{
SpawnPlayer(playerid);
EstaEnElEventoASD[playerid] = 0; // Pon tu variable.
KillTimer(TimerDetectWater[playerid]);
}
}
return 1;
}
D:\Escritorio\Archivos - Samp\copia de seguridad\pawno\include\mSelection.inc(192) : error 017: undefined symbol "TEXT_DRAW_FONT_MODEL_PREVIEW" D:\Escritorio\Archivos - Samp\copia de seguridad\pawno\include\mSelection.inc(196) : error 017: undefined symbol "PlayerTextDrawSetPreviewModel" D:\Escritorio\Archivos - Samp\copia de seguridad\pawno\include\mSelection.inc(197) : error 017: undefined symbol "PlayerTextDrawSetPreviewRot" D:\Escritorio\Archivos - Samp\copia de seguridad\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "mZoom" D:\Escritorio\Archivos - Samp\copia de seguridad\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "Zrot" D:\Escritorio\Archivos - Samp\copia de seguridad\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "Yrot" D:\Escritorio\Archivos - Samp\copia de seguridad\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "Xrot" D:\Escritorio\Archivos - Samp\copia de seguridad\pawno\include\mSelection.inc(189) : warning 203: symbol is never used: "modelindex" D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\gamemodes\ZaC.pwn(48929) : error 017: undefined symbol "EstaEnElEventoASD" D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\gamemodes\ZaC.pwn(48929) : warning 215: expression has no effect D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\gamemodes\ZaC.pwn(48929) : error 001: expected token: ";", but found "]" D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\gamemodes\ZaC.pwn(48929) : error 029: invalid expression, assumed zero D:\Escritorio\Archivos - Samp\ZeroAttack-ControlFR\gamemodes\ZaC.pwn(48929) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Errors. |
Tambiйn puedes hacerlo detectando si la posiciуn Z es menor a la del agua (no se si es 0.... en ese caso serнa Z < 0).
|
Eso servirнa mбs porque si es para un "derby" el jugador cae al agua con un auto, no nadando
|