Jump to content

Hospital Timer Expressing On Screen


LI0LIKAS

Recommended Posts

Hey,

Actually, I should have this topic posted on SA:MP forum, but I don't get my account confirmed and in this forum you get insta confirmation.

So, this is a script of player timer after his death. What I am asking for is how to represent that timer on screen.  With a string.

I'm a beginner at scripting so don't mind if there are any mistakes.

 

This is the code when the player dies:

public OnPlayerDeath(playerid, killerid, reason)
{
	if(killerid == INVALID_PLAYER_ID)
	{
		GameTextForPlayer(playerid,"You are dead",5000,2);
		GivePlayerMoneyA(playerid,-500);
	 	SetTimer("RespawnHospital", 3500, 0);

		return 1;
 	}
   	
    	return 1;
}

These are the callbacks:

public RespawnHospital(playerid)
{
		SetSpawnInfo(playerid,GetPlayerTeam(playerid),GetPlayerSkin(playerid),322.197998,302.497985,999.148437,275.7301,0,0,0,0,0,0);
		GetGender(playerid);
		SetPlayerInterior(playerid, 5);
		SpawnPlayer(playerid);
  		SetTimer("DEAD1", 60000, 0);

	return 1;
}

public DEAD1(playerid)
{
		SetPlayerHealth(playerid,100);
		SetPlayerPos(playerid,1242.1780,328.2336,19.7555);
		SetPlayerInterior(playerid,0);
		SendClientMessage(playerid,WHITE,"* You have been healed.");
		
 	return 1;
}

 

 

Thank you in advance,

LIOLIKAS.

  • Confused 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...