My site
Hospital Timer Expressing On Screen - SAMP/PAWNO FORUM
[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
SAMP/PAWNO FORUM » Pawno » Scripting Help » Hospital Timer Expressing On Screen
Hospital Timer Expressing On Screen
gvidas429Date: Wednesday, 2018-01-17, 2:35 PM | Message # 1
Private
Group: Users
Messages: 4
Reputation: 0
Status: Offline
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 code when the player dies:



Code
[*]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:


Code
[*]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.
 
milossteam6969Date: Thursday, 2018-09-20, 4:38 PM | Message # 2
Private
Group: Users
Messages: 4
Reputation: 0
Status: Offline
ok
 
fplay185Date: Monday, 2020-11-09, 6:22 AM | Message # 3
Private
Group: Users
Messages: 4
Reputation: 0
Status: Offline
surprised
 
fahadtariqucpDate: Wednesday, 2021-02-03, 4:56 PM | Message # 4
Private
Group: Users
Messages: 1
Reputation: 0
Status: Offline
You can format a string that shows the timer and show it with gametext or textdraw whatever you're using. Set the timer to true every 1 second and kill it when player spawns.
 
lirlir60001Date: Friday, 2023-06-02, 6:02 PM | Message # 5
Private
Group: Users
Messages: 4
Reputation: 0
Status: Offline
mhm
 
SAMP/PAWNO FORUM » Pawno » Scripting Help » Hospital Timer Expressing On Screen
  • Page 1 of 1
  • 1
Search:


free hit counter
Thank You For Visiting