Hospital Death Respawn Problem
#1

Well, Basically I am trying to make it so that when someone dies they go to hospital, That worked fine!

but then when the time is up after the hospital they are meant to be outside... However the spawn at their joining position.

I then tried an idea of using this;

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][pHospital] = 0) // Not dead in hospital
    {
        SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
        SetPlayerPos(playerid, PlayerInfo[playerid][pPos][0], PlayerInfo[playerid][pPos][1], PlayerInfo[playerid][pPos][2]);
        SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPos][3]);
        return 1;
    }
    else if(PlayerInfo[playerid][pHospital] = 1) //Is dead in hospital
    {
        SetPlayerPos(playerid, -316.0580, 1052.8657, 20.3318);
        return 1;
    }
    SetPlayerColor(playerid, COLOR_GREY);
    return 1;
}
However this returns the following errors;

Код:
(1032) : warning 211: possibly unintended assignment
(1039) : warning 211: possibly unintended assignment
Line 1032;
pawn Код:
if(PlayerInfo[playerid][pHospital] = 0) // Not dead in hospital
Line 1039;
pawn Код:
else if(PlayerInfo[playerid][pHospital] = 1) //Is dead in hospital
Any Ideas?
Reply
#2

PHP код:
PlayerInfo[playerid][pHospital] == 
You forgot an extra =.
Reply
#3

Thanks. Ill try it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)