Few questions ((Rp Gm))
#4

if you want the script, just ask it! lol like this it will work:
Код:
//under defines
new gPlayerUsingLoopingAnim[MAX_PLAYERS];

LoopingAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
{
    gPlayerUsingLoopingAnim[playerid] = 1;
    ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
}
//
public onplayerupdate(playerid); // i'd recommand to use a timer for this, go see my tutorial on speedo with timer, it will get you started with timers 
{
   new Float:health;

    GetPlayerHealth(playerid,health);
    if (health < 25.0)
    {
    new string[256];
    LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); // nice anim for this, but change it if you like (sweet_injured is nice too).
    format(string, sizeof(string), "~p~ You need Help!"); // color is purple
    GameTextForPlayer(playerid, string, 3000, 5); // 3000 is 3 second and 5 is the writiing style
    TogglePlayerControllable(playerid, false);

    return 1;
    }

	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	if(gPlayerUsingLoopingAnim[playerid]) {
		gPlayerUsingLoopingAnim[playerid] = 0; // reset player, if killed while needing help
                             TogglePlayerControllable(playerid, True); //makes the player controllable , if killed during anim
	}

 	return 1;
}
i let you manage how to make the medics know the guy is hurt, do some of the work! haha
Reply


Messages In This Thread
Few questions ((Rp Gm)) - by Anthonyx3' - 16.08.2010, 03:45
Re: Few questions ((Rp Gm)) - by pmk1 - 16.08.2010, 04:37
Re: Few questions ((Rp Gm)) - by Anthonyx3' - 16.08.2010, 04:48
Re: Few questions ((Rp Gm)) - by pmk1 - 16.08.2010, 05:05
Re: Few questions ((Rp Gm)) - by Anthonyx3' - 16.08.2010, 06:11
Re: Few questions ((Rp Gm)) - by Anthonyx3' - 16.08.2010, 06:21
Re: Few questions ((Rp Gm)) - by wups - 16.08.2010, 07:02
Re: Few questions ((Rp Gm)) - by Anthonyx3' - 16.08.2010, 14:59
Re: Few questions ((Rp Gm)) - by Claude - 16.08.2010, 16:42
Re: Few questions ((Rp Gm)) - by pmk1 - 16.08.2010, 16:45

Forum Jump:


Users browsing this thread: 1 Guest(s)