Need Small Help
#1

why this not work?
PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponidbodypart)
{
       if(
weaponid == 8)
          {
          new 
Float:HP;
        
GetPlayerHealth(playeridHP);
        
SetPlayerHealth(playerid,HP-50.0);
        
PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
        
PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
        return 
1;
}
return 
1;
}
          } 
Reply
#2

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
       if(issuerid != INVALID_PLAYER_ID && weaponid == 8)
          {
          new Float:HP;
        GetPlayerHealth(playerid, HP);
        SetPlayerHealth(playerid,HP-50.0);
        PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
        PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
        }
return 1;
}
Try this?
Reply
#3

Dude I Already Try That Still not work
Reply
#4

what is the error code?
Reply
#5

I get no Error ,I want to Get Playerid Half HP when he Hit by Katana by Issuerid
Reply
#6

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
	if(issuerid != INVALID_PLAYER_ID && weaponid == 8)
	{
		new Float:HP;
		print("Debug 1");
		GetPlayerHealth(playerid, HP);
		print("Debug 2");
		SetPlayerHealth(playerid,HP-50);
		print("Debug 3");
		PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
		print("Debug 4");
		PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
		print("Debug 5");
	}
	return 1;
}
hit someone with katana and see server.log
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)