What the heck. [Hospital]
#1

I've made a basic hospital system for my script, whenever a player is killed he is sent to the hospital where he's released after a minute. (Using a timer).

It works like charm however if you tab out and the time expires before you tab back in you will start falling and you will recieve a smoke. :S
Reply
#2

=> UP

(Seems like no-one have any clue about any of my issues, since my last two posts have 0 replies and 24 views).
Reply
#3

You should post that piece of code, otherwise we can't help you!
Reply
#4

How is a SetPlayerPos() TogglePlayerControllable() relevant? The problem is regarding a special action that tends to appear.
Reply
#5

Why not use
in order:

pawn Код:
// ClearAnimations(playerid); // purely optional
SpawnPlayer(playerid); // for some servers this is an issue with weapons and weapon spawns
// then ...
SetPlayerPos()
// if you have anticheat add something to ignore or clear him of cheats reported, not not important.
and see what happens after the player maximizes (you know?)
Reply
#6

Quote:
Originally Posted by Tenshi
Посмотреть сообщение
Why not use
in order:

pawn Код:
// ClearAnimations(playerid); // purely optional
SpawnPlayer(playerid); // for some servers this is an issue with weapons and weapon spawns
// then ...
SetPlayerPos()
// if you have anticheat add something to ignore or clear him of cheats reported, not not important.
and see what happens after the player maximizes (you know?)
I'm already using SpawnPlayer and SetPlayerPos(), it works like a charm unless the player minimizes the window.
Reply
#7

is the player falling close to the location of this hospital or where he is being re-spawned?
( also is it same virtual world? )
Reply
#8

You can use OnPlayerPause by The_Moddler.

Example;

Create a variable.
pawn Код:
new InHospital[MAX_PLAYERS];
Then set it to 0 OnPlayerConnect.
pawn Код:
public OnPlayerConnect(playerid)
{
    InHospital[playerid] = 0;
    return 1;
}
Then:
pawn Код:
public OnPlayerPause(playerid)
{
    if(InHospital[playerid] == 1) // You could kill the timer.
    return 1;
}

public OnPlayerUnPause(playerid)
{
    if(InHospital[playerid] == 1) // Start the timer again.
    return 1;
}
It's just an idea... I don't know why it does it like that.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)