Help plz
#1

y make a Hospital system now when y die y not spawn in the hospital(y Set to spawn on Hospital) it's spawn again in civil but the script is running the player is not moving in the civil spawn when he die wtf is ?
Reply
#2

Quote:
Originally Posted by 3RoR
Посмотреть сообщение
y make a Hospital system now when y die y not spawn in the hospital(y Set to spawn on Hospital) it's spawn again in civil but the script is running the player is not moving in the civil spawn when he die wtf is ?
You really need to start including more detailed information and a copy of the script you are running but are having troubles with. We cannot read your mind, nor can we pull code from thin air to fix your problem!
Reply
#3

Quote:
Originally Posted by 3RoR
Посмотреть сообщение
y make a Hospital system now when y die y not spawn in the hospital(y Set to spawn on Hospital) it's spawn again in civil but the script is running the player is not moving in the civil spawn when he die wtf is ?
You have an errror in your language code. We can not understand you.
Reply
#4

why when a player dies, not going to hospital ?
y Set setPlayerpos(...);
when he die the script is running but he ain't going to the pose :@
Reply
#5

Try using this:

Add this on top of your script

pawn Код:
new playerDeath[MAX_PLAYERS];

Now let's get onto the main work

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    playerDeath[playerid] = 1; // This is saying that the player died.
    return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(playerDeath[playerid] == 1) // This is checking if the player had died previously
    {
        SetPlayerPos(playerid, X, Y, Z); // Replace X, Y, and Z With the Hospital Co-ords.
        playerDeath[playerid] = 0; // This is saying the player is not dead.
        return 1;
    }
    return 1;
}

Hopefully this helped you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)