Server side problem
#1

I did a server side for SetPlayerHealth and look:
PHP код:
PUBLIC: SetPlayerHealthEx(playeridFloat:health)
{
    new 
Float:tmp_health health,Float:newhp;
    if (
tmp_health 0.0tmp_health 0.0;
    else if (
tmp_health 100.0tmp_health 100.0;
    
AntiCheatInfo[playerid][acHealth] = tmp_health;
    
SetPlayerHealth(playeridtmp_health);
    
GetPlayerHealth(playeridnewhp);
    
printf("GetPlayerHealth: %.01f\nAntiCheatHealth: %.01f\nHealth: %.01f"newhpAntiCheatInfo[playerid][acHealth], tmp_health);
    return 
1;

This is debug
PHP код:
GetPlayerHealth99.0
AntiCheatHealth
98.0
Health
98.0 
Where is the problem i don`t understand, i don`t found any bugs ....

PHP код:
PUBLIC: PlayerHealthLoss()
{
    new 
Float:oldhealthFloat:amount;
    foreach(
Playerx)
    {
        if(
PlayerInfo[x][pStatus] == 1)
        {
            
GetPlayerHealth(xoldhealth);
            
amount floatsub(oldhealth1.0);
            
SetPlayerHealthEx(xamount);
        }
    }
    return 
1;

This function is called per every minute
Reply


Messages In This Thread
Server side problem - by jamal1992 - 01.09.2015, 11:04
Re: Server side problem - by MarvinPWN - 01.09.2015, 11:12
Re: Server side problem - by jamal1992 - 01.09.2015, 11:21
Re: Server side problem - by jamal1992 - 01.09.2015, 11:27
Re: Server side problem - by jamal1992 - 01.09.2015, 12:20
Re: Server side problem - by Vince - 01.09.2015, 12:31
Re: Server side problem - by jamal1992 - 01.09.2015, 14:00

Forum Jump:


Users browsing this thread: 1 Guest(s)