[Help] Damage Weapons - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] Damage Weapons (
/showthread.php?tid=638605)
[Help] Damage Weapons -
PhamHoang - 03.08.2017
Do I want bigger baseball bats to do more damage?
When I used OnPlayerTakeDamage, I turned off pawno
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
new Float:HP;
GetPlayerHealth(playerid, HP);
if(weaponid == 5) SetPlayerHealth(playerid, HP-10);
return 1;
}
Compiler error
Re: [Help] Damage Weapons -
Suttix - 03.08.2017
Quote:
Originally Posted by PhamHoang
Do I want bigger baseball bats to do more damage?
When I used OnPlayerTakeDamage, I turned off pawno
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
new Float:HP;
GetPlayerHealth(playerid, HP);
if(weaponid == 5) SetPlayerHealth(playerid, HP-10);
return 1;
}
Compiler error
|
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
You're missing "bodypart".Try this.
Re: [Help] Damage Weapons -
aoky - 03.08.2017
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
new Float:HP;
GetPlayerHealth(playerid, HP);
if(weaponid == 5) SetPlayerHealth(playerid, HP-10);
return 1;
}
Try this.
Re: [Help] Damage Weapons -
PhamHoang - 03.08.2017
Still fails to load pawno
Re: [Help] Damage Weapons -
PhamHoang - 03.08.2017
If you remove the code then load the compiler normally
Re: [Help] Damage Weapons -
PhamHoang - 03.08.2017
Error