Hospital Timer Expressing On Screen -
LI0LIKAS - 21.01.2018
Hey,
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 OnPlayerDeath callback:
Код:
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 other 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);
SetTimer("DEAD1", 60000, 0);
SpawnPlayer(playerid);
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;
}
Re: Hospital Timer Expressing On Screen -
RowdyrideR - 21.01.2018
You need SetTimerEx “
https://sampwiki.blast.hk/wiki/SetTimerEx”
To make the timer specific to each player himself, otherwise it will be to the whole server.
Re: Hospital Timer Expressing On Screen -
Ultrablaze - 21.01.2018
I still don't know what do you want, You can send a private message and I will be happy to help you.
Re: Hospital Timer Expressing On Screen -
LI0LIKAS - 21.01.2018
Quote:
Originally Posted by RowdyrideR
|
thanks, but now I get these warnings:
SAMG.pwn(593) : warning 202: number of arguments does not match definition
SAMG.pwn(625) : warning 202: number of arguments does not match definition
SAMG.pwn(665) : warning 202: number of arguments does not match definition
Re: Hospital Timer Expressing On Screen -
RowdyrideR - 21.01.2018
Show me the code you did
Re: Hospital Timer Expressing On Screen -
LI0LIKAS - 21.01.2018
Quote:
Originally Posted by RowdyrideR
Show me the code you did
|
What do you mean?
It is very large.