-
forward Health();
public Health()
{
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);
TogglePlayerControllable(i,0); //igy biztos hogy nem fog tudni mozogni
ApplyAnimation(i, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);
ApplyAnimation(i, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);//az animaciokat érdemes 2szer elküldeni mert sokszor bebuggolnak
GameTextForPlayer(i, \"~r~Ossze estel!! Hivj mentot!! /service medic\", 5000, 3);
}
TogglePlayerControllable(i,0); //igy biztos hogy nem fog tudni mozogni
ApplyAnimation(i, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);
ApplyAnimation(i, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0); //az animaciokat érdemes 2szer elküldeni mert sokszor bebuggolnak
GameTextForPlayer(i, \"~r~Ossze estel!! Hivj mentot!! /service medic\", 5000, 3);
}
}
}
}
return 1;
}
Üdv, mérnem esik animba hogyha 20 hp alatt van?
-
nah ez engem is érdekelni fog :angel:
sose játsza le nekem, de mások látják hogy én fekszek vagy valami. :dodge:
-
Ez 0.3b bug tudtommal.
-
Nekem nem ien gondom van ::| Mert ez az elõzõ modban máár tököléetesen müködött
-
én ugy oldotam meg az ilyet hogy csintam 1 Másodperces timert amikor 20 alatt a hp ja és akkor 1 másodperc után csinja az animot
Igy próbáld meg:
forward Health();
forward anim(playerid);
public Health()
{
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);
TogglePlayerControllable(i,0); //igy biztos hogy nem fog tudni mozogni
ApplyAnimation(i, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);
ApplyAnimation(i, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);//az animaciokat érdemes 2szer elküldeni mert sokszor bebuggolnak
GameTextForPlayer(i, \"~r~Ossze estel!! Hivj mentot!! /service medic\", 5000, 3);
}
TogglePlayerControllable(i,0); //igy biztos hogy nem fog tudni mozogni
ApplyAnimation(i, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);
ApplyAnimation(i, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0); //az animaciokat érdemes 2szer elküldeni mert sokszor bebuggolnak
GameTextForPlayer(i, \"~r~Ossze estel!! Hivj mentot!! /service medic\", 5000, 3);
SetTimer(\"anim\",1000,0);
}
}
}
}
return 1;
}
public anim(playerid)
{
ApplyAnimation(i, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);
}
Így jó lesz
-
Nemjó:S
-
Töltsd le ezt:
http://solidfiles.com/d/65e9/
-
Erroros:D Fixcarh.h meg a foreach
-
#include <fixchars.h> // Letöltési link: http://solidfiles.com/d/ikKV/
#include <foreach> // Letöltési link: http://solidfiles.com/d/2046/
-
A forcesync paraméter kell csak az ApplyAnimation végére.
-
Igen Fade igazad van de ha ,1-et ír a végére akkor a következõ warning-ot fogja kidobni neki:
warning 202: number of arguments does not match definition
Menj bele a pawno mappába nyisd meg a a_players.inc-et jegyzettömbbel majd keress rá a következõre:
ApplyAnimation
majd ezután ezt a sort:
native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0);
szerkeszd erre:
native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 1);
Ezután a hibaüzenet(warning) kompilálásnál nemfog elõjönni.
Ha nem menne itt van a csatolt fájl:
[a csatolmányt egy admin törölte]