hellosztok elkezdtem csinálni egy animba esés-t a modom hoz de meg akadtam
ezek meg vanak ha kérhetnék valakit ki tudná potolni ami hiányzik?
public CheckHealth()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gPlayerSpawned == 1)
{
new Float:health;
GetPlayerHealth(i, health);
if(health < 30)
{
if(IsPlayerInAnyVehicle(i))
{
RemovePlayerFromVehicle(i);
ApplyAnimation(i, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);
GameTextForPlayer(i, \"~r~Ossze estel!! Hivj mentot!! /hivas mento\", 5000, 3);
}
ApplyAnimation(i, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);
GameTextForPlayer(i, \"~r~Ossze estel!! Hivj mentot!! /hivas mento\", 5000, 3);
}
}
}
}
return 1;
}
//----------------------------[/segit rendszer]----------
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,60);
ClearAnimations(giveplayerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_RED, \"Nincs ilyen ID!\");
return 1;
}
}*/
Code tagek pótolva. - ZeRo
public for20hp(playerid)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health < 30)// ez azt jelenti ha az élet kisseb mint 30
{ //akkor
ApplyAnimation(playerid,\"CRACK\",\"crckdeth2\",4.1,1,1,1,1,1); //nyomjon be egy ApplyAnimationt
}
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;
}