Se mezclan sistemas de muerte
#1

Bueno, creo este tema para organizarme, les explico, tengo un sistema de muerte normal, pero tambiйn otro cuando se muere con estrellas, la cosa es que se mezclan, no anda como deberнa, hay veces que carga los dos juntos(cuando se muere con estrellas) y hay veces que si se muere sin estrellas carga el que no tendrнa que cargar, acб lo dejo:

PHP код:
//OnPlayerDeath
  
if(Info[playerid][pWantedLevel] >= 1//Si el nivel de bъsqueda es mayor o igual a 1 se ejecutara.
   
{
    new 
Float:PosXFloat:PosYFloat:PosZFloat:PosA;
    new 
SkinAgonizando GetPlayerSkin(playerid); //Obtenemos el skin actual.
    
GetPlayerPos(playeridPosXPosYPosZ); //Obtenemos la posiciуn actual.
    
GetPlayerFacingAngle(playeridPosA); //Obtenemos el бngulo.
    
SetSpawnInfo(playerid0SkinAgonizandoPosXPosYPosZPosA000000); //Seteamos la informaciуn de spawn para que spawnee en tal posiciуn y con tal skin.
    
EstaAgonizando[playerid] = 1//Le damos el valor de "1" a la variable "EstaAgonizando".
   

PHP код:
//OnPlayerSpawn
  
if(EstaAgonizando[playerid] == 1//Si la variable "EstaAgonizando" es igual a 1 se ejecutarб.
   
{
        
SetHP(playerid15);
        
TogglePlayerControllable(playerid,0);
        
SetPVarInt(playerid"IsFrozen"0);
        
ApplyAnimation(playerid"SWEET""Sweet_injuredloop"4.0100001);
        
ApplyAnimation(playerid"SWEET""Sweet_injuredloop"4.0100001);
        
SendClientMessageEx(playeridCOLOR_WHITE"Estas agonizando, espera a que un policia te busque.");
        
SendClientMessageEx(playeridCOLOR_WHITE"Recuerda que no puedes aceptar muerte.");
    } 
PHP код:
//Sistema de muerte en OnPlayerDeath
    
GetPlayerPos(playeridpxpypz);
    if(
GetPVarInt(playerid"Injured") == && Info[playerid][pWantedLevel] == 0)
    {
        if( 
GetPVarInt(playerid"EventToken") >= 1)
        {
            
ResetPlayerWeaponsEx(playerid);
        }
        else
        {
            
ResetPlayerWeaponsEx(playerid);
        }
    } 
El sistema me lo paso GlobitoPawn
Reply


Messages In This Thread
Se mezclan sistemas de muerte - by ElvergitaLarga - 15.04.2017, 01:55
Re: Se mezclan sistemas de muerte - by GlobitoPawn - 15.04.2017, 02:36
Re: Se mezclan sistemas de muerte - by ElvergitaLarga - 15.04.2017, 02:45
Re: Se mezclan sistemas de muerte - by Marricio - 15.04.2017, 03:08
Re: Se mezclan sistemas de muerte - by ElvergitaLarga - 16.04.2017, 17:33
Respuesta: Se mezclan sistemas de muerte - by Z0MBERTH - 16.04.2017, 22:11
Re: Se mezclan sistemas de muerte - by ElvergitaLarga - 16.04.2017, 23:03
Re: Se mezclan sistemas de muerte - by ElvergitaLarga - 17.04.2017, 22:27

Forum Jump:


Users browsing this thread: 1 Guest(s)