Sziasztok!
Itt azt szeretném, hogy ha a player 30 hp alá megy akkor, kerüljön animba, és ne tudjon mozogni, amig valaki föl nem segíti.
Vagyis igy: TogglePlayerControllable(playerid, 0)
Valaki tudna segíteni?
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(amount >= 5)
{
SendClientMessage(playerid, NARANCS, \"(( Megsebeztek! ))\");
SendClientMessage(issuerid, NARANCS, \"(( Megsebezted! ))\");
}
if(issuerid != INVALID_PLAYER_ID && weaponid == 22)
{
new Float:armour;
GetPlayerArmour(playerid, armour);
if(armour <= 0)
{
new Float:health;
GetPlayerHealth(playerid,health);
SetPlayerHealth(playerid, health-50.0);
}
}
if(issuerid != INVALID_PLAYER_ID && weaponid == 24)
{
new Float:armour;
GetPlayerArmour(playerid, armour);
if(armour <= 0)
{
new Float:health;
GetPlayerHealth(playerid,health);
SetPlayerHealth(playerid, health-50.0);
}
}
if(issuerid != INVALID_PLAYER_ID && weaponid == 5)
{
SetPlayerDrunkLevel(playerid, GetPlayerDrunkLevel(playerid) + 5000);
}
return 1;
}