Ich nehme an du willst erst die Health voll machen, und dann die Armour, oder?
Dann so:
ocmd:smokeweed2(playerid, params[])
{
if(PlayerInfo[playerid][sWeed] > 0)
{
new Float:pHealth, pArmour;
GetPlayerHealth(playerid, pHealth);
GetPlayerArmour(playerid, pArmour);
if(pHealth == 100.0 && pArmour == 100.0) return SendClientMessage(playerid, COLOR_WHITE, "* Du brauchst kein Weed mehr.");
if(pHealth > 100.0 || pArmour > 100.0) return SendClientMessage(playerid, COLOR_WHITE, "* Du bist ein Cheater.");
if(pHealth + 25.0 <= 100) SetPlayerHealth(playerid, pHealth+25.0);
else
{
SetPlayerHealth(playerid, 100.0);
pArmour += pHealth-75;
if(pArmour > 100.0) pArmour = 100.0;
SetPlayerArmour(playerid, pArmour);
}
PlayerInfo[playerid][sWeed] -= 2;
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
GiveNameSpace(sendername);
SaveDrugs(playerid);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "* Du hast kein Weed mehr.");
}
return 1;
}