Help, i have a error
#3

1 you forgot to declare health
2 you'r brackets were bad

PHP код:
if
}

fix:

PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid == City)
    {
        
GameTextForPlayer(playerid" Estas En Tierra Robada "6000,1);
        
GivePlayerWeapon(playerid461);
        
SetPlayerHealth(playerid94);
        
SetPlayerPos(playerid,-1492.5255,2509.5999,601.1897);
        
SetPlayerVirtualWorld(playerid, -1);
        
SetTimerEx("FuncionVida",1000,true,"i",playerid);
    }
    return 
1;
}
forward FuncionVida();
public 
FuncionVida()
{
    new 
Float:health;
    for(new 
i;i<MAX_PLAYERS;i++)
    {
        new 
funcionvidaa[i] = SetTimerEx("FuncionVida",1000,true,"i",playerid);
        if(
IsPlayerConnected(i)) // Verifica que el jugador estй conectado y logeado
    
{
    
GetPlayerHealth(ihealth); //Estableciendo el valor flotante health con GetPlayerHealth
    
if(health && < 95)
    { 
//Si su vida es mayor a 0...
        
SetPlayerHealth(ihealth+5); //Da +5 de vida al jugado
    
}
    if(
health 95)
    {
        
KillTimer(funcionvidaa[i])
    }
    return 
1;

Reply


Messages In This Thread
Help, i have a error - by MandaleMecha - 23.05.2018, 14:28
Re: Help, i have a error - by Kraeror - 23.05.2018, 14:37
Re: Help, i have a error - by Lokii - 23.05.2018, 14:48

Forum Jump:


Users browsing this thread: 1 Guest(s)