Hospital problem
#2

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PInfo[playerid][AdminDuty] == 1)
    {
        label[playerid] = Create3DTextLabel("On-Duty admin, do not attack",0x008080FF,30.0,40.0,50.0,40.0,0);
        Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
        SetPlayerSkin(playerid, 217);
        SetPlayerHealth(playerid, 10000);
        GivePlayerWeapon(playerid, WEAPON_MINIGUN, 100000);
    }
    if(PlayerInfo[playerid][ForHospital] == 1)
    {
         SetTimerEx( "HospitalTimer2", 1000, 0, "d", playerid );
    }
    return 1;
}



public HospitalTimer2( playerid )
{
        TogglePlayerControllable( playerid, 0 );
        SetPlayerPos( playerid, 2309.0232,-1142.1338,1055.1511 );
        SetPlayerInterior( playerid, 12 );
        SetPlayerFacingAngle( playerid, 359.8549 );
        SetPlayerCameraLookAt( playerid, 2309.0232,-1142.1338,1055.1511 );
        GameTextForPlayer( playerid, "You are in hospital now, please wait for doctors to cure you", 3000, 6 );
        SetTimerEx( "HospitalTimer", 60*1000, 0, "d", playerid );
        PInfo[ playerid ][ ForHospital ] = 0;
    return 1;
}
I guess that's the problem
I changed the spital check.I moved it at OnPlayerSpawn
Reply


Messages In This Thread
Hospital problem - by Mean - 13.02.2011, 15:13
Re: Hospital problem - by SkizzoTrick - 13.02.2011, 16:15
Re: Hospital problem - by Mean - 13.02.2011, 18:49

Forum Jump:


Users browsing this thread: 1 Guest(s)