Anti-HH Screwed. - 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: Anti-HH Screwed. (
/showthread.php?tid=574428)
Anti-HH Screwed. -
DeathKing - 17.05.2015
Код HTML:
#define SetPlayerHealthEx(%0,%1) pHealth[%0] = floatround(%1); SetPlayerHealth(%0, floatround(%1));
#define SetPlayerArmourEx(%0,%1) pArmour[%0] = floatround(%1); SetPlayerArmour(%0, floatround(%1));
SetPlayerHealthEx(playerid, 75);
That is what i am making and getting the empty statement upon using it
Код HTML:
stock SetPlayerHealthEx(playerid, Float:health)
{
SetPlayerHealth(playerid, health);
pHealth[playerid] = health;
return 1;
}
stock SetPlayerArmourEx(playerid, Float:armour)
{
SetPlayerArmour(playerid, armour);
pHealth[playerid] = armour;
return 1;
}
SetPlayerHealthEx(playerid, 75);
Converting it to stock.... No Errors
Re: Anti-HH Screwed. -
Threshold - 17.05.2015
Remove the ';' from the end of the #define line.
pawn Код:
#define SetPlayerHealthEx(%0,%1) pHealth[%0] = (%1), SetPlayerHealth(%0, (%1))
#define SetPlayerArmourEx(%0,%1) pArmour[%0] = (%1), SetPlayerArmour(%0, (%1))
Example:
pawn Код:
#define var(%0) Kick(%0);
public OnPlayerConnect(playerid)
{
var(playerid); // Becomes 'Kick(playerid);;'
}
pawn Код:
#define var(%0) Kick(%0)
public OnPlayerConnect(playerid)
{
var(playerid); // Becomes 'Kick(playerid);'
}