#include <a_samp>forward NeedToEat(playerid);new FirstSpawn[MAX_PLAYERS];new Float:CurHealth[MAX_PLAYERS];public OnPlayerSpawn(playerid){ FirstSpawn[playerid] += 1; new Float:health; GetPlayerHealth(playerid, health); CurHealth[playerid] = health; if(FirstSpawn[playerid] == 1) SetTimerEx(\"NeedToEat\",35000,1,\"i\",playerid);return 1;}public NeedToEat(playerid){new Float:health; GetPlayerHealth(playerid, health);if(CurHealth[playerid] >= health){SetPlayerHealth(playerid,health-5);CurHealth[playerid] = health;}else{CurHealth[playerid] = health; }}
public for20hp(playerid){ new Float:health; GetPlayerHealth(playerid,health); if(health < 30) { ApplyAnimation(playerid,\"CRACK\",\"crckdeth2\",4.1,1,1,1,1,1); } return 1;}new pTimer[MAX_PLAYERS];public OnPlayerConnect(playerid){ pTimer[playerid] = SetTimerEx(\"for20hp\",1000,1,\"i\",playerid); return 1;}public OnPlayerDisconnect(playerid){ KillTimer(pTimer[playerid]); return 1;}
if(strcmp(cmd, \"/segit\",true) == 0){ if (giveplayerid == playerid) { SendClientMessage(playerid, 0xFFFF00AA, \"Magadat nem segítheted fel.\"); } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLD: /segit [playerid]\"); return 1; } giveplayerid = strval(tmp); if(IsPlayerConnected(giveplayerid)) { SetPlayerHealth(giveplayerid,35); ClearAnimations(giveplayerid); return 1; } else { SendClientMessage(playerid, COLOR_RED, \"Nincs ilyen ID!\"); return 1; }}